14

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.

2

8 Answers 8

11

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.

Sign up to request clarification or add additional context in comments.

Comments

6

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

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

Comments

3

Just choose Vuetify 3 if you are using Vue 3:

enter image description here

Comments

2

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.

Comments

1

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

Comments

1

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

Comments

1

Vue create

use vue version 2

after installation run vue add vuetify

error solve

Comments

0

When prompted, Choose Vuetify 3 Preview (Vuetify 3)

1 Comment

It would be more helpful if you could add some details of how this would solve the OP's question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.