Vue packages version mismatch If you are using vue-loader@>=10.0, simply update vue-template-compile

项目下载并npm install后,执行npm run dev 报如下错误:

Vue packages version mismatch:

- [email protected]
- [email protected]

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改成和vue-template-compiler一样的版本

方法一:改 vue

npm install [email protected] --save


方法二:改 vue-template-compiler

先卸载:npm uninstall vue-template-compiler
再安装:npm install  vue-template-compiler

再执行npm run dev,就OK了

猜你喜欢

转载自blog.csdn.net/qq_29483485/article/details/128398045