【问题标题】:Got "TS2300: Duplicate identifier 'Account'" error after upgraded to Typescript 2.9.1升级到 Typescript 2.9.1 后出现“TS2300: Duplicate identifier 'Account'”错误
【发布时间】:2018-11-14 14:20:05
【问题描述】:
在我升级到 Typescript 2.9.1(从 2.8)后,我得到了编译错误提示
node_modules/typescript/lib/lib.es2017.full.d.ts:33:11 - 错误 TS2300:重复的标识符“帐户”。
这在我使用 typescript 2.7 和 2.8 时从未发生过。
环境:
- MacOS 10.13.5
- Node.js v9.11.1
- NPM:6.1.0
- Typescript 2.9.1(在我项目的
node_modules 文件夹中,没有全局 typescript)
// tsconfig.json
{
“编译器选项”:{
“模块”:“commonjs”,
“目标”:“es2017”,
“noImplicitAny”:是的,
"moduleResolution": "节点",
“源地图”:是的,
"outDir": "ts-build",
"baseUrl": ".",
“路径”:{
“核心/*”: [
“./服务器/内核/*”
]
},
"rootDir": ".",
“allowJs”:是的,
“类型根”:[
“node_modules/@types”
],
“emitDecoratorMetadata”:真,
“experimentalDecorators”:是的,
“类型”:[],
“keyofStringsOnly”:真
},
“包括”: [
“服务器/**/*”,
“应用程序。*.js”
],
“排除”: [
“节点模块”
]
}
【问题讨论】:
标签:
typescript