0

Angular2 - duplicate identifier error

M:/workspace/Angular2StartKit/node_modules/angular2/typings/browser.d.ts(6,14): error TS2300:     Duplicate identifier 'PromiseConstructor'.
M:/workspace/Angular2StartKit/node_modules/angular2/typings/es6-collections/es6-collections.d.    ts(22,5): error TS2300: Duplicate identifier 'done'.
M:/workspace/Angular2StartKit/node_modules/angular2/typings/es6-collections/es6-collections.d.    ts(23,5): error TS2300: Duplicate identifier 'value'.
M:/workspace/Angular2StartKit/node_modules/angular2/typings/es6-collections/es6-collections.d.    ts(46,5): error TS2300: Duplicate identifier 'size'.
M:/workspace/Angular2StartKit/node_modules/angular2/typings/es6-collections/es6-collections.d.    ts(52,5): error TS2300: Duplicate identifier 'prototype'.
M:/workspace/Angular2StartKit/node_modules/angular2/typings/es6-collections/es6-collections.d.    ts(66,5): error TS2300: Duplicate identifier 'size'.
M:/workspace/Angular2StartKit/node_modules/angular2/typings/es6-collections/es6-collections.d.    ts(72,5): error TS2300: Duplicate identifier 'prototype'.
M:/workspace/Angular2StartKit/node_modules/angular2/typings/es6-collections/es6-collections.d.    ts(88,5): error TS2300: Duplicate identifier 'prototype'.
M:/workspace/Angular2StartKit/node_modules/angular2/typings/es6-collections/es6-collections.d.    ts(103,5): error TS2300: Duplicate identifier 'prototype'.
M:/workspace/Angular2StartKit/node_modules/angular2/typings/es6-promise/es6-promise.d.ts(11,15):     error TS2300: Duplicate identifier 'Promise'.
M:/workspace/Angular2StartKit/node_modules/angular2/typings/es6-promise/es6-promise.d.ts(42,16):     error TS2300: Duplicate identifier 'Promise'.
__lib.d.ts(565,5): error TS2300: Duplicate identifier 'done'.
__lib.d.ts(566,5): error TS2300: Duplicate identifier 'value'.
__lib.d.ts(823,5): error TS2300: Duplicate identifier 'size'.
__lib.d.ts(833,5): error TS2300: Duplicate identifier 'prototype'.
__lib.d.ts(849,5): error TS2300: Duplicate identifier 'prototype'.
__lib.d.ts(861,5): error TS2300: Duplicate identifier 'size'.
__lib.d.ts(871,5): error TS2300: Duplicate identifier 'prototype'.
__lib.d.ts(886,5): error TS2300: Duplicate identifier 'prototype'.
__lib.d.ts(1257,11): error TS2300: Duplicate identifier 'Promise'.
__lib.d.ts(1278,11): error TS2300: Duplicate identifier 'PromiseConstructor'.
__lib.d.ts(1347,13): error TS2300: Duplicate identifier 'Promise'.    

I have exculded the es6 files that the compiler is complaining about, but i am not sure if it is getting excluded for sure as the compiler is still complaining

{
  "compilerOptions": {
    "target": "ES6",
    "module": "system",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": false
  },

  "exclude": [
    "node_modules",
    "typings/es6-promise/es6-promise.d.ts",    
    "typings/es6-collections/es6-collections.d.ts",
    "dist"    
  ] 

}  

I have also included the followin the bootstarp.js file after doing somereaserch online

///<reference path="../../node_modules/angular2/typings/browser.d.ts"/>

Any idea what's wrong here ?

2
  • Probably helpful, stackoverflow.com/questions/31322525/… Commented Jun 19, 2016 at 14:44
  • I deleted the conflicting files to make it work .. not the right approach, but had to move forward. Commented Jun 23, 2016 at 18:07

1 Answer 1

1

Remove ///<reference path="../../node_modules/angular2/typings/browser.d.ts"/>

in the exclude array of tsconfig.json add the following

typings/browser.d.ts,
typings/browser
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.