Intellisense not recognizing Vue SFC's component
See original GitHub issueInfo
- Platform: Windows
- Vetur version: 0.22.6, installed through VSIX from VSCode in administrator mode
- VS Code version: 1.39.2 (System setup)
Problem
Looks like VSCode won’t recognize my Vue component in the SFC file, but just an ordinary object:
When I write this.
, computed properties predefinedTags
, computedTags
etc. are suggested as methods because like mode
, they are all declared as computed
’s member, but I can’t get any intellisense suggestions from data()
.
Output from Vue Language Server log:
Loaded bundled typescript@3.6.3.
Vetur initialized
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:9 (5 by maintainers)
Top Results From Across the Web
VS Code intellisense not working for data in vue sfc component
but inside the method, 'name' is considered as any. If I hover the name in data it shows it as string. vetur plugin...
Read more >Vue IntelliSense in VSCode - ITNEXT
I find stand-alone “Vue components” that have a single purpose that you can install from NPM and use in any project are great!...
Read more >Setup | Vetur - GitHub Pages
# Project Setup · package.json must exist in the project root, Vetur uses it to determine the installed Vue version. · Next, create...
Read more >VS Code intellisense not working for data in vue sfc ...
Coding example for the question VS Code intellisense not working for data in vue sfc component-Vue.js.
Read more >VSCode SFC intellisense? : r/vuejs - Reddit
I am unable to "go to definition" on single file components.. Has anyone gotten this to work? I have tried adding a vue-shims.d.ts...
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
why dosen’t it work for me?
If
vetur.useWorkspaceDependencies: true
, you will usetypescript@2.9.2
in vetur and not have any error. The error is happened when usingtypescript@^3.x.x
. It’s a type definition error inVue
lib. Ref: vuejs/vue#11235