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.

Auto import of components broken

See original GitHub issue

Environment

  • Operating System: Linux
  • Node Version: v16.14.0
  • Nuxt Version: 3.0.0-27429889.e45a780
  • Package Manager: yarn@1.22.17
  • Bundler: Vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://github.com/jiblett1000/test

Describe the bug

With the latest update on npm as of this writing, auto importing of components seems to be completely broken. I’ve linked a reproduction with a fresh nuxt3 install with a single component in the components directory. Running yarn dev results in this error:

[Vue warn]: Failed to resolve component: Test If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:13
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

10reactions
the94aircommented, Feb 26, 2022

This error was driving me crazy, good thing that I decided to search on GitHub issues and not give up on it 😂

8reactions
hamidooChecommented, Feb 26, 2022

This isn’t a dependency issue - it’s resolved by #3396, and you can work around for the moment by configuring components: { global: true }. Make sure to revert that change after that PR is merged.

I tried adding this to my nuxt config however it does not seem to work for me. 😟

You temporarily need to roll back to an older version yarn add -D nuxt3@3.0.0-27428764.271289c

or you can temporarily just add those lines in your nuxt.config it should work

  components: {
    global: true,
    dirs: ['~/components']
  }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Auto Import of React Components in Visual Studio Code [closed]
I'm not able to get auto import of components working. I've been using the Auto Import plugin by steoates, but it doesn't seem...
Read more >
Is there a way to auto import components? : r/sveltejs - Reddit
I have a nested hierarchy of components in my $lib/components folder. Each component is in its own folder as an index.svelte file, ...
Read more >
Auto-Import not resolving TypeScript source (not declarations ...
Auto -Import dialog should prompt you to "import {SignUpComponent} from '@kabbage/angular/components/signup/component';" What happens instead?
Read more >
Auto Import Components In Svelte Kit - Weekly Svelte - YouTube
https://github.com/yuanchuan/sveltekit-autoimporthttps://github.com/yuanchuan/sveltekit- autoimport /issues/3globals.d.ts `declare const ...
Read more >
unplugin-vue-components - npm
Components auto importing for Vue. Latest version: 0.22.12, last published: 12 days ago. Start using unplugin-vue-components in your project ...
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