Reputation: 141
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.
someone has the same problem, need some solution, thank you.
Upvotes: 14
Views: 20621
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
Reputation: 11
Vue create
use vue version 2
after installation run vue add vuetify
error solve
Upvotes: 1
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
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'.
Upvotes: 1
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
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