前端

Vue packages version mismatch:- vue@2.6.14 - vue-template-compiler@2.6.11解决方法

起因

vue执行了npm i vue@2.6.14的更新命令, 就会出现如下提示:

 error  in ./src/pages/system/permissionsmanagement.vue
 
Module build failed: Error:
 
Vue packages version mismatch:
 
- vue@2.6.14 (/Users/dx/Documents/2021works/TaiTaiLeYingXiaoPC/node_modules/vue/dist/vue.runtime.common.js)
- vue-template-compiler@2.6.11 (/Users/dx/Documents/2021works/TaiTaiLeYingXiaoPC/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.
解决思路:

npm i vue-template-compiler和vue版本需要一致

解决办法:

更新vue-template-compiler, 命令行输入:

npm i vue-template-compiler@2.6.14(你的vue版本号)
————————————————
版权声明:本文为CSDN博主「S筱潇S四维Smile」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_29483485/article/details/123711261