components: Since updating from Nuxt 2.15.4 to 2.15.8, auto import components no longer work
Nuxt version 2.15.8
Describe the bug
All my components are saved to the root of the components directory - so no potential issue with missing prefixes there. When I try and add a component into my pages, for example…
/components/CookieConsent.vue
/layouts/defaut.vue:
<template>
<div class="app">
<main class="main">
<Nuxt />
</main>
<cookie-consent :decline-allowed="false" position="bottom-left"/>
</div>
</template>
...i get the following error:
Unknown custom element: <cookie-consent> - did you register the component correctly? For recursive components, make sure to provide the “name” option.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (5 by maintainers)
I’ve got it working 🎉. .
and now it works. No idea why
Thanks for your help. Shame I can’t help anyone else figure it out any more specifically though, as it seems like whatever it is, is happening to lots of people.
same issue nuxt: 2.15.8 nuxt/component: 2.1.8
I have the same issue: nuxt: 2.15.8 nuxt/component: 2.1.8
I’ve the same issue as described in the bug description with:
nuxt: v2.15.8 nuxt/components: v2.2.1
I’m seeing the same thing with a fresh install and fresh
yarn.lock. Any thoughts? It installs@nuxt/componentversion 2.1.8.Excerpt from `package.json’: