Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Errors : vue add vuetify

vue add 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.

āžœ  git:(master) āœ— vue add vuetify

šŸ“¦  Installing vue-cli-plugin-vuetify...

yarn add v1.22.10
[1/4] šŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] šŸ”—  Linking dependencies...#######################################################################################----] 1133/1170
[4/4] šŸ”Ø  Building fresh packages...
success Saved 1 new dependency.
info Direct dependencies
└─ [email protected]
info All dependencies
└─ [email protected]
✨  Done in 3.66s.
āœ”  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 (/Users/alpha/.nvm/versions/node/v14.17.3/lib/node_modules/@vue/cli/node_modules/jscodeshift/src/Collection.js:213:13)
    at injectOptions (/Users/alpha/.nvm/versions/node/v14.17.3/lib/node_modules/@vue/cli/lib/util/codemods/injectOptions.js:15:6)
    at runTransformation (/Users/alpha/.nvm/versions/node/v14.17.3/lib/node_modules/@vue/cli/node_modules/vue-codemod/dist/src/runTransformation.js:60:17)
    at /Users/alpha/.nvm/versions/node/v14.17.3/lib/node_modules/@vue/cli/lib/Generator.js:290:23
    at Array.forEach (<anonymous>)
    at Generator.resolveFiles (/Users/alpha/.nvm/versions/node/v14.17.3/lib/node_modules/@vue/cli/lib/Generator.js:276:24)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Generator.generate (/Users/alpha/.nvm/versions/node/v14.17.3/lib/node_modules/@vue/cli/lib/Generator.js:175:5)
    at async runGenerator (/Users/alpha/.nvm/versions/node/v14.17.3/lib/node_modules/@vue/cli/lib/invoke.js:111:3)
    at async invoke (/Users/alpha/.nvm/versions/node/v14.17.3/lib/node_modules/@vue/cli/lib/invoke.js:92:3)

I've tried again

enter image description here

Now I got this

enter image description here

like image 253
code-8 Avatar asked Feb 25 '26 05:02

code-8


1 Answers

There must be the following code in the main.js, otherwise the error will occur. So just add this code before installation:

new Vue({
    render: h => h(App),
}).$mount('#app');
like image 163
Mohammadhossein Dolatabadi Avatar answered Feb 28 '26 03:02

Mohammadhossein Dolatabadi