2

I am new to vuejs and vuetify. First I ran the command npm install @vue/cli -g. Then I ran the command vue create test. And I am getting this error:

C:\Users\Dell\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\vue-templat
e-compiler\index.js:10
  throw new Error(
  ^

Error:

Vue packages version mismatch:

- vue@2.5.17 (C:\Users\Dell\node_modules\vue\dist\vue.runtime.common.js)
- vue-template-compiler@2.6.10 (C:\Users\Dell\AppData\Roaming\npm\node_modules\@
vue\cli\node_modules\vue-template-compiler\package.json)

This may cause things to work incorrectly. Make sure to use the same version for
 both.
If you are using vue-loader@>=10.0, simply update vue-template-compiler.
If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify sho
uld bump vue-template-compiler to the latest.

   at Object.<anonymous> (C:\Users\Dell\AppData\Roaming\npm\node_modules\@vue\c
li\node_modules\vue-template-compiler\index.js:10:9)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (C:\Users\Dell\AppData\Roaming\npm\node_modules\@vue\c
li\node_modules\vue-jscodeshift-adapter\src\parse-sfc.js:1:18)
    at Module._compile (internal/modules/cjs/loader.js:776:30)

Earlier I was running the same command to make vuetify projects. Then there were no errors. So now how do I create a new project in vuetify?

  • Thanks for editing. – Boidurja Talukdar Jul 5 '19 at 6:21
  • 1
    Mods, can I suggest moving this question over to StackOverflow. I think it is more suitable and will get more visibility there – hanxue Aug 2 '19 at 3:21
  • Yeah I was surprised to see it here. Will add it myself if this is then moved let me know and will close mine as duplicated. – code4jhon Oct 23 '19 at 22:37
  • here it is, feel free to edit it to improve it stackoverflow.com/questions/58531851/… – code4jhon Oct 23 '19 at 22:45
2

If you accidentally installed vue package in your user's directory (C:\Users\Dell), then try to remove node_modules directory there ( C:\Users\Dell\node_modules ).

node_modules directory is usually created by npm or yarn command.

How was the version mismatch cuased? It looks like your packages are loaded from different locations:

  • vue@2.5.17 (C:\Users\Dell\node_modules\vue\dist\vue.runtime.common.js)
  • vue-template-compiler@2.6.10 (C:\Users\Dell\AppData\Roaming\npm\node_modules@ vue\cli\node_modules\vue-template-compiler\package.json)

References:

1

Following worked for me:

npm install vue

The above command showed + vue@2.6.10

Edit the file C:\Users\Dell\node_modules\vue\dist\vue.runtime.common.js. This file listed on the first line of the error above.

At line 5001 there is following line:

Vue$3.version = '2.5.11';

change that to

Vue$3.version = '2.6.10';

Then run vue create.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.