'Error: You cannot call "get" on a collection with no paths. Instead, check the "length" property first to verify at least 1 path exists
My CLI version is 4.5.8. I'm trying to install Vuetify but this error is showing up. Some please hep me to fix this error.
>vue add vuetify
� Installing vue-cli-plugin-vuetify...
+ [email protected]
updated 1 package in 27.591s
63 packages are looking for funding
run `npm fund` for details
✔ Successfully installed plugin: vue-cli-plugin-vuetify
? Choose a preset: Default (recommended)
� Invoking generator for vue-cli-plugin-vuetify...
ERROR Error: You cannot call "get" on a collection with no paths. Instead, check the "length" property first to verify at least 1 path exists.
Error: You cannot call "get" on a collection with no paths. Instead, check the "length" property first to verify at least 1 path exists.
at Collection.get (C:\Program Files\nodejs\node_modules\@vue\cli\node_modules\jscodeshift\src\Collection.js:213:13)
at injectOptions (C:\Program Files\nodejs\node_modules\@vue\cli\lib\util\codemods\injectOptions.js:15:6)
at runTransformation (C:\Program Files\nodejs\node_modules\@vue\cli\node_modules\vue-codemod\dist\src\run-transformation.js:61:17)
at C:\Program Files\nodejs\node_modules\@vue\cli\lib\Generator.js:290:23
at Array.forEach (<anonymous>)
at Generator.resolveFiles (C:\Program Files\nodejs\node_modules\@vue\cli\lib\Generator.js:276:24)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Generator.generate (C:\Program Files\nodejs\node_modules\@vue\cli\lib\Generator.js:175:5)
at async runGenerator (C:\Program Files\nodejs\node_modules\@vue\cli\lib\invoke.js:111:3)
at async invoke (C:\Program Files\nodejs\node_modules\@vue\cli\lib\invoke.js:92:3)
Solution 1:[1]
Update your main.js before running
vue add vuetify
Main.js (Vue 2)
new Vue({
render: h => h(App)
}).$mount("#app");
Post Installation
new Vue({
vuetify,
render: h => h(App)
}).$mount('#app
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Pallav Chanana |
