K.Fasico
K.Fasico

Reputation: 141

Errors while doing vue add vuetify(vue3 preview)

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.

Upvotes: 14

Views: 20621

Answers (8)

ahmnouira
ahmnouira

Reputation: 3501

Just choose Vuetify 3 if you are using Vue 3:

enter image description here

Upvotes: 3

Jaz Az
Jaz Az

Reputation: 1

When prompted, Choose Vuetify 3 Preview (Vuetify 3)

Upvotes: 0

user14417178
user14417178

Reputation: 61

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

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

Upvotes: 6

Saurabh Gawade
Saurabh Gawade

Reputation: 11

Vue create

use vue version 2

after installation run vue add vuetify

error solve

Upvotes: 1

Marcelo Vinicius
Marcelo Vinicius

Reputation: 871

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.

Upvotes: 11

Owamamwen
Owamamwen

Reputation: 61

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

Upvotes: 1

Muhammad Abdullah
Muhammad Abdullah

Reputation: 49

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.

Upvotes: 2

Botir Adoshboyev
Botir Adoshboyev

Reputation: 21

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

Upvotes: 1

Related Questions