question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Intellisense not recognizing Vue SFC's component

See original GitHub issue
  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • 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: image

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:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
ZhengXiaoweicommented, Jul 2, 2020

why dosen’t it work for me?

2reactions
yoyo930021commented, Mar 23, 2020

If vetur.useWorkspaceDependencies: true, you will use typescript@2.9.2 in vetur and not have any error. The error is happened when using typescript@^3.x.x. It’s a type definition error in Vue lib. Ref: vuejs/vue#11235

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found