vue-loader: Vue packages version mismatch error
Vue packages version mismatch:
- vue@2.0.5
- vue-template-compiler@2.0.6
This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using vue-loader or vueify, re-installing them should bump vue-template-compiler to the latest.
In our project, we use exact dependencies:
"vue": "2.0.5",
"vue-loader": "9.7.0",
Since vue-loader uses caret ranges for vue-template-compiler…
"vue-template-compiler": "^2.0.5",
…when our Jenkins CI job runs npm install, the latest version of vue-template-compiler will get installed and will mismatch our vue version, causing random build failures whenever vue-template-compiler is upgraded.
A workaround suggested here https://github.com/vuejs/vue/issues/3941 is to re-install vue-loader. We would rather work with exact versions of our dependencies and choose on our own when to upgrade.
To make matters more difficult, we can’t use shrinkwrap in our repository due to https://github.com/npm/npm/issues/2679.
Can vue or vue-loader address this case somehow?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 15 (2 by maintainers)
Commits related to this issue
- vue-template-compiler as a peer dependency `vue-template-compiler` is now a peer dependency instead of a direct dependency. This allows the user to pin `vue-template-compiler` to a specific version i... — committed to oligot/rollup-plugin-vue by deleted user 7 years ago
- vue-template-compiler as a peer dependency (#126) * vue-template-compiler as a peer dependency `vue-template-compiler` is now a peer dependency instead of a direct dependency. This allows the use... — committed to vuejs/rollup-plugin-vue by deleted user 7 years ago
Fixed for me:
npm install vue-template-compiler --save-devFor me it was because my Vue version was behind my vue-template-compiler by 4 patches (vue@2.6.6 vs vue-template-compiler@2.6.10). I just updated vue both globally and locally and everything worked.
So with Yarn as my package manager:
same mismatch problem with new spark 4.09 install.
Have you considered using yarn with a lockfile?
This was what I needed… Very thanks!
You need check your vue version in global. I removed the old vue version in global then npm install vue@2.2.4 -g,That solved my issue.
Just cleaned the yarn cache and tried again, now it works well !