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.

Vetur + auto import components using @nuxt/components broken

See original GitHub issue
  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ
  • I have tried restarting VS Code or running Vetur: Restart VLS

Info

  • Platform: WSL2
  • Vetur version: v0.35.0
  • VS Code version: 1.65.0

Problem

When attempting to Go to Definition by CTRL + clicking on a component (which is automatically imported by Nuxt from a sub directory of components/) inside a Vue template, the following error is displayed:

image

Support for automatically generating a tags.json file has been added to @nuxt/components since version 0.2.4. The team also introduced the necessary changes to Vetur in this PR.

From what I could gather, it looks like this externalTagProvider is simply not loaded. That, or I’m missing something from the documentation on how to enable support for it. Can anyone see what is going wrong here?

Reproducible Case

  1. Set up a basic Nuxt.js project. Automatically importing components from the components/ directory is already enabled by default;
  2. Create a nested directory and component structure as per the documentation;
  3. Add the component to a template and attempt to Go to definition.
  4. 💥

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
pi0commented, May 31, 2022

Hi @99linesofcode. I’ve no ideas about vue-editor-bridge.ts. We didn’t make any noticeable change for Nuxt 2 and @nuxt/components but it might need some for latest version compatibility. @octref any hints are more than welcome would be happy to help 🙏🏼

1reaction
JorgeVVcommented, Mar 7, 2022

#2567 helped me with this issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuxt not automatically importing components from nested ...
In my nuxt app, components in nested directories are not automatically importing as expected. For some of my components i have something ...
Read more >
FAQ | Vetur - GitHub Pages
This is usually caused by VS Code not correctly updating Vetur's dependencies from ... Vetur can't recognize components imported using webpack's alias.
Read more >
Vue.js | PhpStorm Documentation - JetBrains
js-aware code completion for components, including components defined in separate files, attributes, properties, methods, slot names, and more.
Read more >
vuejs/vetur (Raised $789.00) - Issuehunt
JavaScript code suggestions in Vue components not working on Vetur 0.22.5 ... Vetur + auto import components using @nuxt/components broken.
Read more >
CHANGELOG.md · igiting/vetur - Gitee.com
Breaking change: ⚠️ ... #2522; Fix templates in custom blocks are parsed as root elements. ... Detect tags from @nuxt/components.
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