项目构建失败 - Error: Vue packages version mismatch
前言
2021年6月2号,这一天构建项目又失败了。
仅此记录,告诫自己项目构建失败一定要去看日志,不要上来就说我啥都没动怎么就构建失败了,我本地好好的没有问题啊,怎么又构建了一次还是不行呢。
报错如下:
Error: Vue packages version mismatch: - vue@2.6.13 (/www/webdev/node_modules/vue/dist/vue.runtime.common.js) - vue-template-compiler@2.6.12 (/www/webdev/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. 复制代码
问题分析
这个报错很简单。
vue
和 vue-template-compiler
版本不匹配导致。
问题解决
修改版本号。将
vue-template-compiler@2.6.12
修改为 2.6.13 版本。"vue-template-compiler": "^2.6.13"
最后
文章是自己手敲,是对工作日常的总结,如有错误之处,敬请指正
作者:别再找借口c
链接:https://juejin.cn/post/7025518692767105032