Errors while doing vue add vuetify(vue3 preview)

Viewed 14380

I tried to start a vue3 project with vuecli, but when I add vuetify, errors occurred while everything is normal when used vue2. It says

Error: You cannot call "get" on a collection with no paths. Instead, check the "length" property first to verify at least 1 path exists.

errorpicture

someone has the same problem, need some solution, thank you.

8 Answers

In this link https://vuetifyjs.com/en/getting-started/installation/ Vuetify says:

The current version of Vuetify does not support Vue 3. Support for Vue 3 will come with the release of Vuetify v3. When creating a new project, please ensure you selected Vue 2 from the Vue CLI prompts, or that you are installing to an existing Vue 2 project.

Add the following to main.js. It would solve the problem

new Vue({
    router,
    store,
    vuetify,
    render: h => h(App)
}).$mount("#app");

vue3 is giving this error because vue3 is in beta version if you use vue2 you solve your problem. My error is solved by this solution.

Just try with the vue2 version as creating vue instance. I got the same error too and vue2 prevented the error.

If you want to used 'Vue-3 + Vuetify' exclude TypeScript Later you can include when you finished initializing and added 'vue add vuetify'.

enter image description here

Vue create

use vue version 2

after installation run vue add vuetify

error solve

When prompted, Choose Vuetify 3 Preview (Vuetify 3)

Just choose Vuetify 3 if you are using Vue 3:

enter image description here

Related