【发布时间】:2017-12-23 09:07:20
【问题描述】:
尝试构建一个 Angular 应用程序时,我在 node_modules 文件夹中遇到 typescript 文件的编译错误。
例如:
TS2420:“CdkTable”类错误地实现了接口 'CollectionViewer'。
CdkTable 位于 @angular/cdk/typings/table/table.d.ts
我的工具版本:
npm -v: 5.0.3
节点-v:v8.1.4
tsc -v:版本 2.2.3
我的 tsconfig.json:
{
"compilerOptions": {
"moduleResolution": "node",
"target": "es5",
"sourceMap": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"skipDefaultLibCheck": true,
"lib": [ "es6", "dom" ],
"types": [ "node" ]
},
"exclude": [ "bin", "node_modules" ],
"atom": { "rewriteTsconfig": false }
}
请注意,该项目可以在其他计算机上编译。
【问题讨论】:
标签: visual-studio angular typescript