Gre*_*nov 14 visual-studio-code
我已经在 stackoverflow jsconfig.json 给出 ts 错误上寻找答案。\n我尝试过:
\n"exclude": ["node_modules"]\nRun Code Online (Sandbox Code Playgroud)\n在 jsconfig.json 中
\n"noEmit": true \nRun Code Online (Sandbox Code Playgroud)\n在 jsconfig.json 中的“compilerOptions”中
\n删除node_moduls和package-lock.json并在npm install之后
\nnpm install --save @types/dotenv\nRun Code Online (Sandbox Code Playgroud)\n没有任何帮助:(
\n我只使用 js 文件或 jsx。我的操作系统 ubuntu (Focal Fossa)。\xd0\xa1an 有人向我解释错误来自哪里。它与 TypeScript 有什么关系?如何彻底摆脱它?除了上面已经做的事情之外,我还能做什么?
\n完整的错误消息是:
\n{\n "resource": "path/jsconfig.json",\n "owner": "typescript",\n "severity": 8,\n "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",\n "source": "ts",\n "startLineNumber": 1,\n "startColumn": 1,\n "endLineNumber": 1,\n "endColumn": 2\n}\nRun Code Online (Sandbox Code Playgroud)\n
小智 10
您可以在 Visual Studio 中使用以下方法作为解决方法。文件 > 首选项 > 设置,在搜索栏中输入“typescript validate”,然后取消选中结果。
| 归档时间: |
|
| 查看次数: |
31885 次 |
| 最近记录: |