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.

For recursive components, make sure to provide the "name" option. But name is provided for all components.

See original GitHub issue

Version

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:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
posvacommented, Sep 11, 2018

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

Read more comments on GitHub >

github_iconTop 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 >

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