[英]Karma Angular - Cannot Find Name 'X'
I'm getting a load of errors when I run Karma Start
in my angular project. 在我的角度项目中运行
Karma Start
时,出现了大量错误。
All the errors say: 'Cannot find name Blob', 'Cannot Find name KeyboardEvent', 'Cannot find name HTMLElement', etc. 所有错误都说明:“找不到名称Blob”,“找不到名称KeyboardEvent”,“找不到名称HTMLElement”等。
my tsconfig.json: 我的tsconfig.json:
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es2016",
"dom"
],
"typeRoots": [
"./node_modules/@types/"
],
"types": [
"jasmine",
"node",
"core-js"
]
}
}
Help! 救命!
在tsconfig.app.json中将“ dom”添加到lib修复了它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.