简体   繁体   中英

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?

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM