-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Vue packages version mismatch: #5161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Please run Seems due to wrong hoisting or because you 've previously installed an old version of vue globally. |
haoqunjiang
added a commit
to haoqunjiang/vue-cli
that referenced
this issue
Feb 8, 2020
… packages closes vuejs#5161 The root cause of such issues: `vue-jscodeshift-adapter` requires `vue-template-compiler`. `vue-template-compiler` tries to require the `vue` package and check its version on startup. Normally, there's no `vue` package in the dependency tree of `@vue/cli`, so this check will just skip. But if the user has installed some other global package that depend on `vue`, and hoists it to the root `node_modules`, `vue-template-compiler` would successfully require it and check against that `vue` version, which sometimes may be outdated, thus failing the bootstrap process.
9 tasks
haoqunjiang
added a commit
that referenced
this issue
Feb 27, 2020
… packages (#5163) closes #5161 The root cause of such issues: `vue-jscodeshift-adapter` requires `vue-template-compiler`. `vue-template-compiler` tries to require the `vue` package and check its version on startup. Normally, there's no `vue` package in the dependency tree of `@vue/cli`, so this check will just skip. But if the user has installed some other global package that depend on `vue`, and hoists it to the root `node_modules`, `vue-template-compiler` would successfully require it and check against that `vue` version, which sometimes may be outdated, thus failing the bootstrap process.
Seems to not be fixed. (Installed with $ vue create test-e2e
/home/akryum/.config/yarn/global/node_modules/vue-template-compiler/index.js:10
throw new Error(
^
Error:
Vue packages version mismatch:
- vue@2.6.11 (/home/akryum/.config/yarn/global/node_modules/vue/dist/vue.runtime.common.js)
- vue-template-compiler@2.6.10 (/home/akryum/.config/yarn/global/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> (/home/akryum/.config/yarn/global/node_modules/vue-template-compiler/index.js:10:9)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Module.require (internal/modules/cjs/loader.js:849:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/akryum/.config/yarn/global/node_modules/vue-jscodeshift-adapter/src/parse-sfc.js:1:18)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10) |
Workaround: akryum@akryum-XPS-13-9370:~$ cd .config/yarn/global/
akryum@akryum-XPS-13-9370:~/.config/yarn/global$ rm -rf node_modules/
akryum@akryum-XPS-13-9370:~/.config/yarn/global$ rm yarn.lock
akryum@akryum-XPS-13-9370:~/.config/yarn/global$ yarn
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
4.2.2
Environment info
Steps to reproduce
Install @vue/cli using ```sudo npm install -g @vue/cli`` Try to create new project with vue create myproject
What is expected?
Scaffold new Vue project
What is actually happening?
Throws new error
Error:
Vue packages version mismatch:
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.
The text was updated successfully, but these errors were encountered: