【发布时间】:2021-10-23 01:09:22
【问题描述】:
我已经在 stackoverflow jsconfig.json gives ts errors 上寻找答案。 我试过了:
- 设置
"exclude": ["node_modules"]
在 jsconfig.json 中
- 设置
"noEmit": true
在“compilerOptions”中的 jsconfig.json 中
-
删除 node_moduls 和 package-lock.json 并在 npm install 之后
npm install --save @types/dotenv
没有任何帮助:(
我只使用 js 文件或 jsx。我的操作系统 ubuntu(Focal Fossa)。 Сan有人向我解释错误来自哪里。它与 TypeScript 有什么关系。以及如何完全摆脱它?除了上面已经做过的,我还能做什么?
完整的错误信息是:
{
"resource": "path/jsconfig.json",
"owner": "typescript",
"severity": 8,
"message": "File 'path/node_modules/agent-base/dist/src/index' not found.\n The file is in the program because:\n Root file specified for compilation",
"source": "ts",
"startLineNumber": 1,
"startColumn": 1,
"endLineNumber": 1,
"endColumn": 2
}
【问题讨论】:
-
我也遇到了同样的问题,到目前为止,我遇到的任何解决方案都没有奏效......
-
我有完全相同的问题,但还没有答案。忽略我发布然后删除的答案。我发现它毕竟不起作用。
标签: visual-studio-code vscode-settings