我已从Visual Studio 2017切换到VS2019,突然我在tsconfig.json
文件中收到有关angular 7项目的错误消息。
这是我的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",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
}
}
我收到消息:
'No inputs were found in config file 'tsconfig.json'. Specified 'include' paths were '["**/*"]' and 'exclude' paths were '["test.ts", "**/*.spec.ts"]'.'
我尝试将至少一个ts文件添加到应用文件夹中,以解决该错误file.ts
。
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "es2015",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
},
"include": [
"./file.ts"
]
}
但是它不能解决问题。错误消息停留:
'No inputs were found in config file 'tsconfig.json'. Specified 'include' paths were '[".././file.ts"]' and 'exclude' paths were '["test.ts", "**/*.spec.ts"]'.'
我希望对此有什么帮助?