Vscode plug-in vetur reports an error: it says that the component is useless to throw,
Two components are written in two ways: options API and script setup
My component writing method is vue3’s syntax sugar script setup
Reason: after data query, vehicle (v0.35.0) does not support ts
Solution:
1) Replace the syntax highlighting plug-in volar that supports ts to replace vetur (this method is recommended)
2) Use options API instead of script setup syntax (not recommended)
Similar Posts:
- [Solved] Vetur Plugin Warning: [vue-language-server] Elements in iteration expect to have ‘v-bind:key’ directives
- [Solved] VScode error: vetur can’t find ‘tsconfig. JSON’ or ‘jsconfig. JSON’. Solution to red wave error “vetur. Ignoreprojectwarning”: true,
- [Vue warn]:Error in render: “TypeError: Cannot read property ‘0’ of undefined”
- Failed to parse source for import analysis because the content contains invalid JS syntax
- AOP Configuration Services error: javax.persistence.TransactionRequiredException: no transaction is in progress
- Error reporting when using empirical decorators in vscode
- Vim:function definition file not found
- Vue3 router view keep alive include does not work [How to Solve]
- [Solved] Node.js runs ES6 default import file error: import m1 from’./m1.js’ ^^ SyntaxError: Unexpected identifier
- Python Files Error: SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: tr