3

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

1 Answer 1

1

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');
Sign up to request clarification or add additional context in comments.

Comments

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.