Categories
Vue Answers

How to fix the ‘Unknown custom element: v-app – did you register the component correctly?’ error with Vuetify and Vue.js?

Spread the love

Sometimes, we want to fix the ‘Unknown custom element: v-app – did you register the component correctly?’ error with Vuetify and Vue.js.

In this article, we’ll look at how to fix the ‘Unknown custom element: v-app – did you register the component correctly?’ error with Vuetify and Vue.js.

How to fix the ‘Unknown custom element: v-app – did you register the component correctly?’ error with Vuetify and Vue.js?

To fix the ‘Unknown custom element: v-app – did you register the component correctly?’ error with Vuetify and Vue.js, we should call Vue.use before creating the Vue instance.

For instance, we write

Vue.use(Vuetify);

new Vue({
  el: "#app",
  components: { App },
  template: "<App/>",
});

We call Vue.use with Vuetify to register the Vuetify plugin globally.

And then we create a new Vue instance.

Then we can use v-app in our components.

Conclusion

To fix the ‘Unknown custom element: v-app – did you register the component correctly?’ error with Vuetify and Vue.js, we should call Vue.use before creating the Vue instance.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *