Error during ionic build:


I’m always getting this error when I run ionic build: Duplicate identifier ‘Promise’. Ionic serve runs fine. This is the whole output:

My tsconfig.json looks like this:

  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "declaration": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "lib": ["dom", "es2015"],
    "module": "es2015",
    "moduleResolution": "node",
    "target": "es5"
  "exclude": [
  "compileOnSave": false,
  "atom": {
    "rewriteTsconfig": false


"dependencies": {
  "@angular/common": "2.1.1",
  "@angular/compiler": "2.1.1",
  "@angular/compiler-cli": "2.1.1",
  "@angular/core": "2.1.1",
  "@angular/forms": "2.1.1",
  "@angular/http": "2.1.1",
  "@angular/platform-browser": "2.1.1",
  "@angular/platform-browser-dynamic": "2.1.1",
  "@angular/platform-server": "2.1.1",
  "@ionic/storage": "1.1.6",
  "ionic-angular": "2.0.0-rc.2",
  "ionic-native": "2.2.3",
  "ionicons": "3.0.0",
  "moment": "^2.15.1",
  "rxjs": "5.0.0-beta.12",
  "zone.js": "0.6.21",
  "@types/moment": "^2.13.0",
  "": "^1.4.8"

Any ideas?

Remove @types/es6-promise because setting "lib": ["es2015"] already provides the Promise typings.

@mirkonasato How? I don’t have @types/es6-promise.

Edit: I deleted that folder from node_modules/@types. Getting another error now.

Error: Metadata emit requires the sourceFiles are passed to WriteFileCallback. Update to TypeScript

I’m on Typescript 2.1.1. (tried 2.0.3 too)

For now I have to use ionic serve and cordova run android together.