运行命令时出现错误
ng build --prod
错误:
ERROR in error TS2688: Cannot find type definition file for 'node_modules/@types'.
我已经尝试了Github问题中提到的解决方法,但这对我不起作用。 所以如果有人可以给我解决方案,这是我的tsconfig.json
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "es2015",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es5",
"skipLibCheck": true,
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
],
"paths":{
"*": ["types/*"],
"api-ai-javascript/*":["node_modules/api-ai-javascript/es6/*"]
}
}
}