1 year ago

Make sure to provide the "name" option.

Posted 1 year ago by hjortur17

Hi, I'm trying to register a component with Vue I'm getting error that sound like this: app.js:38568 [Vue warn]: Unknown custom element: < replies > - did you register the component correctly? For recursive components, make sure to provide the "name" option.

found in

---> < ThreadView > < Root>

Here is the app.js file:


window.Vue = require('vue');

import Datepicker from './components/Datepicker.vue';

Vue.component('flash', require('./components/Flash.vue'));

Vue.component('thread-view', require('./pages/Thread.vue'));

const app = new Vue({
    el: '#app',
    components: {Datepicker}

Here is the Replies.vue file:

        <div v-for="reply in items">
            <reply :data="reply"></reply>

    import Reply from './Reply.vue';

    export default {
        props: ['data'],

        components: { Reply },

        data() {
            return {
                items: this.data

And here is the Thread.vue (this file is not stored in components folder this is stored in js/pages)

    import Replies from '../components/Replies.vue';

    export default {
        components: { Replies }

Please sign in or create an account to participate in this conversation.