プレビューログがリロードを繰り返す (Vue packages version mismatch error)
対象
Vue.jsとVue.jsに依存するライブラリ(
vue-template-compiler、vue-loaderなど)を使用し、package.jsonでバージョンを固定していないプロジェクト。
事象
下記のエラーにより、プレビューログがリロードを繰り返す事象が発生します。
[webpack-cli] 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.原因
vue-template-compiler、vue-loaderなどのVue.js関連ライブラリのマイナーバージョンが更新された場合などに、プロジェクトで使用するVue.jsのバージョンと不整合が生じると、上記のエラーが起こります。
対応
package.jsonを開き、devDependencies及びdependenciesに定義されているVue.js、関連ライブラリのバージョンから^を外してバージョンを固定します。
↓
プレビューログより、プロジェクトの再構成を実行します。


最終更新
役に立ちましたか?