For recursive components, make sure to provide the "name" option. But name is provided for all components.
See original GitHub issueVersion
2.5.17
Reproduction link
https://jsfiddle.net/gjx1wvhk/
Steps to reproduce
Just run the code
What is expected?
No error
What is actually happening?
Shows error in console
Hi, I use *.vue components, and I have following error: “Unknown custom element: <comments-list> - did you register the component correctly? For recursive components, make sure to provide the “name” option.” for my component. However I provided names for all components.
Here is sample fiddle to reproduce this error: https://jsfiddle.net/gjx1wvhk/ (open developer console to see error)
There is small difference between fiddle and my code, I use *.vue components, import them relatively and add as components fields to my components:
import CommentsList from './CommentsList.vue'
export default {
name: 'comments',
components: {
CommentsList,
},
...
}
import CommentsList from './CommentsList.vue'
export default {
name: 'comment',
components: {
CommentsList,
},
...
}
import Comment from './Comment.vue'
export default {
name: 'comments-list',
components: {
Comment,
},
...
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
did you register the component correctly? For recursive ...
For recursive components that are not registered globally, it is essential to use not 'any name', but the ...
Read more >Did you register the component correctly? For recursive ...
Hello, i making a recursive thing an i get this error : [Vue warn]: ... For recursive components, make sure to provide the...
Read more >For recursive components, make sure to provide ... - Laracasts
I'm essentially trying to build a visual representation of how a database post table works. Basically a user fills out the the title,...
Read more >How to Solve "Unknown Custom Element" in Vue
For recursive components, make sure to provide the "name" option. Don't worry, I'll show you exactly how to fix this. You need to...
Read more >Solution to Vue.js Error - Unknown custom element - did you ...
For recursive components, make sure to provide the "name" option. My @Component registration looked like this: @Component({ components: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There we go: https://vuejs.org/v2/guide/components-edge-cases.html#Circular-References-Between-Components
This is because both of your components depend on each other. I’m not sure what was the right approach but I’m pretty sure I saw it documented. Maybe it’s using a dynamic import in one of the components. cc @chrisvfritz