Search code examples
javascriptvue.jsvuetify.jsvuejs3vuetifyjs3

Uncaught TypeError: Cannot read properties of undefined (reading 'extend')


I am trying to include the Vuetify library in an existing Vue 3 project, but I am having some problems. Here is the error message that appeared after compiling my project:

vuetify.js?ce5b:42021 Uncaught TypeError: Cannot read properties of undefined (reading 'extend') ...

main.js:

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

const app = createApp(App)
app.use(Vuetify)
app.mount('#app')

All imports of the Vuetify correspond to the official documentation. Are these problems due to the version of my Vue project?


Solution

  • For Vue3 you need to install vuetify@^3.0.1

    import it

    import 'vuetify/styles'
    import { createVuetify } from 'vuetify'
    

    Then create it

    const vuetify = createVuetify()
    

    and then use it

    app.use(vuetify)