-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic component import does not work on a new project v2.15.0 #8851
Comments
@PTiCA1 The component name resolution has changed in |
I am facing the same problem. with the auto import of components, that set in the ~/nuxt/components/index.js, i see my component globoly imported there, but he wont alow me use this component... in my index.js: if i use as a tag component, he allow me, but i i use he wont allow it... ps: this EditortextoEditorTextoCompleto is not named as it. its oficila name is Editor TextoCompleto.vue, and its in a folder i still didnt manege to solve it. anyone else? |
I'm going to close this as I think this is likely just an issue with the new name resolution described here. If the issue persists, please do raise an issue with a reproduction (and consider raising it in that repository). |
Hey @danielroe this is still an issue for me. I have upgraded from i'll add an issue to the components repo as well. |
@toddpadwick Would you open a new issue with a reproduction via https://template.nuxtjs.org? 🙏 |
@toddpadwick, @PTiCA1, I have same issue. Solved it after change config.
After
Option components in nuxt.config.js now expects array with object-params. |
Hi @storageddd thanks, I just tried this, but unfortunately still no luck for me. @danielroe this is not an issue with the name resolution as that change was introduced in version 2.15 and 2.15.4 works fine for me and have been using the name resolution as specified. Versions above 2.15.8 however no longer import components at all whether nested or not. It looks like many other people are experiencing the same issue and have commented on the ticket that I posted on the components repo. In my nuxt.config I have: in my component library, most of my components are in the root at In my app, I use them as follows, which correct me if I'm wrong, is the expected method:
However, for all components whether nested or not, i get |
Versions
Reproduction
Automatic component imports do not work when you create a new project. The whole project is created by default. I just added scss, bootstrap.
error
Unknown custom element: <Container> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
Steps to reproduce
<template><div class="container"><slot /></div></template>
<script> export default { name: "Container" }</script>
<Container> test content </Container>
What is Expected?
Component shown
What is actually happening?
I'm getting a console error:
Unknown custom element: <Container> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
If I install version 2.14.12 everything works fine.
The text was updated successfully, but these errors were encountered: