vue.js - jsconfig.json 给出 ts 错误
问题描述
我jsconfig.json
在我的根目录中使用Nuxt.js
项目。我有一个错误:
File '/home/mike/Documents/nuxt/node_modules/dotenv/types' not found.
The file is in the program because:
Root file specified for compilation
我什至没有使用typescript
,也没有typescript
在创建时设置任何选项Nuxt.js project
jsconfig.json
内容:
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": ["./*"],
"@/*": ["./*"],
"~~/*": ["./*"],
"@@/*": ["./*"]
}
},
"exclude": ["node_modules", ".nuxt", "dist"]
}
我不明白他们是从哪里来的。我该如何摆脱这个错误?没有选择quick fix
所以我不能ignore errors for entire file
解决方案
在尝试了几种解决方案后,我刚刚添加"exclude": ["node_modules"]
并重新启动了 VScode。错误消失了。
推荐阅读
- c++ - C++17 中函数指针的求值顺序
- asp.net - 调试时替换 web.config 设置
- javascript - cancelScheduledValues(x) 后跟 setValueCurveAtTime(x) 抛出错误
- python - 如何使用 Impala 和 Python 代码同时运行查询?
- python-3.x - Selenium - 使用 URL 登录失败
- r - 我怎样才能使用外部功能?
- flutter - 如何在 App-Bar 中的图像文件下方放置文本?
- docker - 将容器中的文件夹公开为 Kubernetes Pod 中的卷
- django - 表记录异常增加:从订单 ID 54 到 86?
- java - 如何以编程方式查找对方法的所有引用?