3.11.0
System:
OS: macOS Mojave 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Binaries:
Node: 8.15.1 - ~/.nvm/versions/node/v8.15.1/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v8.15.1/bin/npm
Browsers:
Chrome: 77.0.3865.90
Firefox: 69.0.2
Safari: 13.0.2
npmGlobalPackages:
@vue/cli: 3.11.0
/Users/user/.config/yarn/global/node_modules/vue-jscodeshift-adapter/node_modules/vue-template-compiler/index.js:10
throw new Error(
^
Error:
Vue packages version mismatch:
- [email protected] (/Users/user/.config/yarn/global/node_modules/vue/dist/vue.runtime.common.js)
- [email protected] (/Users/user/.config/yarn/global/node_modules/vue-jscodeshift-adapter/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 should bump vue-template-compiler to the latest.
at Object.<anonymous> (/Users/user/.config/yarn/global/node_modules/vue-jscodeshift-adapter/node_modules/vue-template-compiler/index.js:10:9)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/user/.config/yarn/global/node_modules/vue-jscodeshift-adapter/src/parse-sfc.js:1:80)
at Module._compile (module.js:653:30)
To create a new project
Not creating the project
Somehow you have an incorrectly hoisted global vue package, or maybe you have mistakenly run yarn global add vue before (which does not have any effect except for messing up the global node_modules directory).
Try yarn global remove vue. If this doesn't help, then try yarn global add [email protected] to make the versions match.
It worked, thanks!
I met the same problem(vue-cli: 4.2.2, yarn: 1.22.0, mac: 10.14.6).
I remove all the file in .config/yarn/global/, which include node_modules, package.json, yarn.lock. Then yarn global add @vue/cli again, vue create [project-name] works.
Most helpful comment
I met the same problem(vue-cli: 4.2.2, yarn: 1.22.0, mac: 10.14.6).
I remove all the file in
.config/yarn/global/, which includenode_modules, package.json, yarn.lock. Thenyarn global add @vue/cliagain,vue create [project-name]works.