[Vuejs]-Vuetify error: "Error in beforeCreate hook: "Error: Vuetify is not properly initialized"

1👍

According to the docs you should have new Vuetify() but I don’t see it within your code.

From this docs https://vuetifyjs.com/en/getting-started/quick-start :

Create a plugin file for Vuetify, src/plugins/vuetify.js with the
below content:

/ src/plugins/vuetify.js

import Vue from 'vue'
import Vuetify from 'vuetify'
import 'vuetify/dist/vuetify.min.css'

Vue.use(Vuetify)

const opts = {}

export default new Vuetify(opts)

If using vuetify-loader use the content below:

// src/plugins/vuetify.js

import Vue from 'vue'
import Vuetify from 'vuetify/lib'

Vue.use(Vuetify)

const opts = {}

export default new Vuetify(opts)

Navigate to your main entry point where you instantiate your Vue
instance and pass the Vuetify object in as an option.

// src/main.js

import Vue from 'vue'
import vuetify from '@/plugins/vuetify' // path to vuetify export

new Vue({
  vuetify,
}).$mount('#app')

Leave a comment