在tsconfig.json文件中出现错误。找不到输入

时间:2020-06-22 15:29:08

标签: angular typescript visual-studio-2017 angular7 visual-studio-2019

我已从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"]'.'

我希望对此有什么帮助?

0 个答案:

没有答案