为什么 jsconfig.json 文件报告“未找到”问题?

Del*_*con 9 visual-studio-code

我的 jsconfig.json 文件报告了一个问题:

File 'c:/.../node_modules/source-map/source-map' not found.
  The file is in the program because:
    Root file specified for compilation
Run Code Online (Sandbox Code Playgroud)

它总是报告两次,并指向{文件中的第一个。

这是我的jsconfig.json

{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es6",
        "baseUrl": ".",
        "paths": {
            "@/*": ["src/*"],
        }
    },
    "include": [
        "src/**/*"
    ],
    "exclude": ["node_modules"]
}
Run Code Online (Sandbox Code Playgroud)

当我重新加载 VSCode 时,它​​消失了几分钟,然后在使用 VSCode 时重新出现。

小智 1

Adding "noEmit": true to compilerOptions and reloading VSCode seems to work for me.