Assembly: Duplicate identifier 'prototype'

When I try to create my application, I received the following errors:

1>node_modules\angular2\typings\browser.d.ts(6,14): error TS2300: Build: Duplicate identifier 'PromiseConstructor'. 1>node_modules\angular2\typings\es6-collections\es6-collections.d.ts(22,5): error TS2300: Build: Duplicate identifier 'done'. 1>node_modules\angular2\typings\es6-collections\es6-collections.d.ts(23,5): error TS2300: Build: Duplicate identifier 'value'. 1>node_modules\angular2\typings\es6-collections\es6-collections.d.ts(46,5): error TS2300: Build: Duplicate identifier 'size'. 1>node_modules\angular2\typings\es6-collections\es6-collections.d.ts(52,5): error TS2300: Build: Duplicate identifier 'prototype'. 1>node_modules\angular2\typings\es6-collections\es6-collections.d.ts(66,5): error TS2300: Build: Duplicate identifier 'size'. 1>node_modules\angular2\typings\es6-collections\es6-collections.d.ts(72,5): error TS2300: Build: Duplicate identifier 'prototype'. 1>node_modules\angular2\typings\es6-collections\es6-collections.d.ts(88,5): error TS2300: Build: Duplicate identifier 'prototype'. 1>node_modules\angular2\typings\es6-collections\es6-collections.d.ts(103,5): error TS2300: Build: Duplicate identifier 'prototype'. 1>node_modules\angular2\typings\es6-promise\es6-promise.d.ts(11,15): error TS2300: Build: Duplicate identifier 'Promise'. 1>node_modules\angular2\typings\es6-promise\es6-promise.d.ts(42,16): error TS2300: Build: Duplicate identifier 'Promise'. 

I do not understand why. Here is my tsconfig:

 { "compilerOptions": { "emitDecoratorMetadata": true, "experimentalDecorators": true, "module": "commonjs", "noEmitOnError": true, "noImplicitAny": false, "outDir": "../wwwroot/appScripts/", "removeComments": false, "sourceMap": true, "target": "es5" }, "exclude": [ "node_modules" ] } 

I have no clue why I am getting this error. I followed this guide: http://www.mithunvp.com/angular-2-in-asp-net-5-typescript-visual-studio-2015/

+5
source share
1 answer


Check that your es6-collections.d.ts is imported more than once. This type of problem occurs if the link is made multiple times.

0
source

Source: https://habr.com/ru/post/1244666/


All Articles