【发布时间】:2017-08-01 23:49:45
【问题描述】:
我正在尝试在一个项目上运行 Webpack,但出现多个错误
node_modules/@types/core-js/index.d.ts
error TS2304: Cannot find name 'PropertyKey'.
...
node_modules/@types/core-js/index.d.ts
error TS2339: Property 'for' does not exist on type 'SymbolConstructor'.
我应该安装我所有的打字,所以我不确定它们来自哪里。我尝试从可编译的项目中复制 package.json,但没有帮助。我错过了什么?
我的 tsconfig 看起来像这样
{
"compilerOptions": {
"target": "es5",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules",
"**/*.spec.ts"
]
}
【问题讨论】: