Angular2 - 重复标识符错误
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'.
我已经删除了编译器抱怨的es6文件,但我不确定它是否被排除在外,因为编译器仍在抱怨
{
"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"
]
}
我在网上做了一些研究之后还包括了bootstarp.js文件中的
///<reference path="../../node_modules/angular2/typings/browser.d.ts"/>
知道这里有什么问题吗?
答案 0 :(得分:1)
删除///<reference path="../../node_modules/angular2/typings/browser.d.ts"/>
typings/browser.d.ts,
typings/browser