起因

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版本号)

Logo

基于 Vue 的企业级 UI 组件库和中后台系统解决方案,为数万开发者服务。

更多推荐