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.
The current version of Vuetify does not support Vue 3.
To include Vuetify into an existing project, you must install its npm package. You can use either npm or yarn to accomplish this task. These are both package managers that allow you to control what resources are available in your application.
No, you can't run Vuetify without Vue. The reason is pretty simple, most of Vuetify is built with vue and most of those components require their script to run, so everything that's not entirely css based will not work.
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.
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