You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was recently attempting to build docs via the documentation package, which has the vue-template-compiler package as a dependency. I ran into an issue where the build was failing because vue-template-compiler was throwing a "Vue packages version mismatch" error.
I did not have vue installed globally or in the node_modules/ of my project's root directory, and it took me a while to figure out how the package was determining the version of vue and where it was resolving on my machine (I had accidentally installed an npm project in a parent directory creating a node_modules/ folder with the vue package in it).
It would be helpful, when the vue-template-compiler throws the "version mismatch" error, to display the path the to vue package that has been resolved. That way, it would be immediately clear which specific vue package on the dev's machine the compiler is comparing its version to.
In the Vue Forum discussion, I asked Linus Borg if he thought a pull request to add this feature would be helpful, and he said it might be. I have created a fork and updated the error message on that forked repo. I'm submitting this feature request to be approved before making the pull request. I also am not sure how to write a unit test for the build error messaging and would appreciate guidance.
What does the proposed API look like?
Updated error message looks like this:
Vue packages version mismatch:
- [email protected]
- [email protected]
Path to vue package: /Users/brianmcmillen/tests/docs-test/node_modules/vue/dist/vue.runtime.common.js
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:
I don't think there is a test for this. Usually, you can search in the test folder for the warning messages and change that test 🙂
I think it would make sense to display both paths (vue and vue-template-compiler) on the same line as the package. Something like
Uh oh!
There was an error while loading. Please reload this page.
What problem does this feature solve?
I was recently attempting to build docs via the
documentation
package, which has thevue-template-compiler
package as a dependency. I ran into an issue where the build was failing becausevue-template-compiler
was throwing a "Vue packages version mismatch" error.I did not have vue installed globally or in the
node_modules/
of my project's root directory, and it took me a while to figure out how the package was determining the version of vue and where it was resolving on my machine (I had accidentally installed an npm project in a parent directory creating anode_modules/
folder with the vue package in it).It would be helpful, when the
vue-template-compiler
throws the "version mismatch" error, to display the path the tovue
package that has been resolved. That way, it would be immediately clear which specificvue
package on the dev's machine the compiler is comparing its version to.In the Vue Forum discussion, I asked Linus Borg if he thought a pull request to add this feature would be helpful, and he said it might be. I have created a fork and updated the error message on that forked repo. I'm submitting this feature request to be approved before making the pull request. I also am not sure how to write a unit test for the build error messaging and would appreciate guidance.
What does the proposed API look like?
Updated error message looks like this:
The text was updated successfully, but these errors were encountered: