Vue packages version mismatch解决方案
Posted 364.99°
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Vue packages version mismatch解决方案相关的知识,希望对你有一定的参考价值。
今天拉取了一个vue项目,npm run dev
报错如下:
Vue packages version mismatch:
- vue@2.6.14 (D:\\xxx\\workProjects\\code\\xxx-console-ui-2.0\\node_modules\\vue\\dist\\vue.runtime.common.js)
- vue-template-compiler@2.7.8 (D:\\xxx\\workProjects\\code\\xxx-console-ui-2.0\\node_modules\\vue-template-compiler\\package.json)
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.
解决方案:
将package.json
中的版本号改为2.6.14
"name": "vue-template-compiler",
"version": "2.6.14",
......
以上是关于Vue packages version mismatch解决方案的主要内容,如果未能解决你的问题,请参考以下文章
Vue packages version conflicts 错误修复
解决vue版本不匹配的问题 Vue packages version mismatch:
Vue packages version mismatch版本问题的解决
Vue packages version mismatch: 版本始终不对的解决方案
Vue packages version mismatch,vue&vue-template-compiler版本冲突导致的编译异常解决