The project has a syntax error in VSCode
See original GitHub issueEnglish (Deep translation):
After creating a project with npx degit antfu/vitesse my-vitesse-app
and installing all the VSCode dependencies described in README.md, VSCode prompts the error.
- The module “. /App.vue” or its corresponding type declaration. 2.
- The attribute “savedName” does not exist on the type “never”.
I solved the first error by adding a .d.ts file of my own.
declare module '*.vue' {
import { defineComponent } from 'vue'
const Component: ReturnType<typeof defineComponent>
export default Component
}
But the second error is still there, and although it doesn’t affect the operation, I’m having a hard time looking at it, how do I get rid of these errors?
Original Chinese:
使用 npx degit antfu/vitesse my-vitesse-app
创建项目并且安装 README.md 中所描述的所有 VSCode 依赖之后,VSCode 提示错误:
- 找不到模块“./App.vue”或其相应的类型声明。
- 类型“never”上不存在属性“savedName”。
我通过自行添加一个 .d.ts 文件解决了第一个错误:
declare module '*.vue' {
import { defineComponent } from 'vue'
const Component: ReturnType<typeof defineComponent>
export default Component
}
但是第二个错误仍然存在,虽然这不影响运行,但是我看着很难受,如何消除这些错误?
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Invalid Syntax error when running python from inside Visual ...
Think this is a bug of VS Code. When you use "run selection/line in python terminal" command, VS Code starts python interpreter and...
Read more >Syntax errors are not displayed C #. · Issue #116291 - GitHub
This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in...
Read more >Syntax Validation | PHP Tools for Visual Studio Documentation
This error indicates a problem in a class hierarchy, the class is either missing a parent or the parent keyword should be removed....
Read more >Debugging in Visual Studio Code
This approach requires that the "<" syntax is passed through the debugger extension and ends up unmodified in the Integrated Terminal. Multi-target debugging....
Read more >Fix program errors and improve code - Visual Studio (Windows)
Press Ctrl+G to quickly jump to the line number where the error occurred. The error is identified by a red "squiggle" underscore. Hover...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Reloading and reopening the program didn’t work, I tried that. I compressed my project, but its dependency files are too big and exceed the upload limit I uploaded it using Google Drive: https://drive.google.com/file/d/13KpNtzA2K4bqVQWQYZ7_wtNB54IEzw7Y/view?usp=sharing
So let me summarize the solution to this problem.
pnpm up -latest vue-tsc
to update your vue-tacVolar: Switch TS plugin on / off
in VS CodeAfter I did the above, both errors were solved without any problems.