Skip to content

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

@vedmant

Description

@vedmant

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: - 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,
  },
...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions