I am building my vue app for the first time with TypeScript and I have been stuck on this Property 'xxx' does not exist on type 'typeof
issue. I have researched similar problems but none seemed to work. I am on "vue": "^3.0.0-0"
and "typescript": "~3.9.3"
I installed vuetify, so in my vuetify.ts I have the first error(Property 'use' does not exist on type 'typeof)
import Vue from 'vue'
import Vuetify from 'vuetify'
Vue.use(Vuetify)
export default new Vuetify({
})
I am passing it in my main.ts
createApp(App)
.use(store)
.use(router)
.use(vuetify)
.mount('#app')
Then on my App.vue where lies the other error (Property 'extend' does not exist on type 'typeof) I have
export default Vue.extend({
name: 'App',
components: {
//
},
data: () => ({
//
})
})
I have also followed the configurations recommended here
Vue 3
has just been released.
and there is no Vue.use()
method anymore.
the correct way now is as you did
createApp(App)
.use(store)
.use(router)
.use(vuetify) // there
.mount('#app')
same for Vue.extend()
it doesn't exist anymore.
I don't know if vuetify is ready for vue 3 now, maybe the doc is not updated yet.
You should either downgrade Vue to version 2.X or start learning vue 3 and wait a bit that all the documentations are ready
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With