-
Notifications
You must be signed in to change notification settings - Fork 907
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
Vue packages version mismatch error #470
Comments
Have you considered using yarn with a lockfile? |
Not yet. Was hoping not to introduce a yet another tool to our build. :) We can give that a shot and report back. It would be nice if this worked with |
Since your team seems to prefer a locked version approach, |
This should be fixed now in v10.0.0 according to the changelog. Will that change reach vueify too or do I open a new issue there? |
I have the same problem when I'm using Yarn. But when trying npm, gulp compiles the vue components without any problem: using yarn:
my dev dependencies are:
|
Just cleaned the yarn cache and tried again, now it works well ! |
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. |
same mismatch problem with new spark 4.09 install. |
Fixed for me:
|
`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 instead of relying on the implicit upgrades from a semver caret range. Without this change, updating Vue.js to version 2.4.2 can result in errors like this: Vue packages version mismatch: - vue@2.4.2 - vue-template-compiler@2.4.1 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. This was first reported in [vue-loader](vuejs/vue-loader#470) and later [fixed in version 10.0.0](https://gist.github.com/yyx990803/faebe22e8763f5b17572b35ed96f52fe#vue-loader1000). There is also [an open issue on vueify](vuejs/vueify#159) but it's not currently fixed.
* 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 instead of relying on the implicit upgrades from a semver caret range. Without this change, updating Vue.js to version 2.4.2 can result in errors like this: Vue packages version mismatch: - vue@2.4.2 - vue-template-compiler@2.4.1 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. This was first reported in [vue-loader](vuejs/vue-loader#470) and later [fixed in version 10.0.0](https://gist.github.com/yyx990803/faebe22e8763f5b17572b35ed96f52fe#vue-loader1000). There is also [an open issue on vueify](vuejs/vueify#159) but it's not currently fixed. * Install vue-template-compiler as a dev dependency This is needed so that the tests work as expected * Don't point to internal npm registry * chore: remove unnecessary log statement * fix: use any vue-template-compiler version which is >= 2.0 * chore: remove CHANGELOG.md; using release notes for change log. [ci skip] [skip ci]
I'll just leave this here if the above does not work. With yarn, the
Relevant part here is |
i Use Vue cli ui tool to update everything. |
For 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:
|
I'm so glad that I posted my above comment becuase I ran into the same issue and forgot how to solve it. This time, however, my vue-template-compiler was behind. Get them both up-to-date globally with:
|
This was what I needed... Very thanks! |
Fixed for me:
I just needed to keep the version of Vue compatible with the compiler |
In our project, we use exact dependencies:
Since
vue-loader
uses caret ranges forvue-template-compiler
......when our Jenkins CI job runs
npm install
, the latest version ofvue-template-compiler
will get installed and will mismatch ourvue
version, causing random build failures whenevervue-template-compiler
is upgraded.A workaround suggested here vuejs/vue#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 npm/npm#2679.
Can
vue
orvue-loader
address this case somehow?The text was updated successfully, but these errors were encountered: