Vue packages version mismatch:VUE版本不匹配

Vue packages version mismatch:VUE版本不匹配

报错

Vue packages version mismatch:
 
- vue@2.6.14 (/Users/dx/Documents/2021works/TaiTaiLeYingXiaoPC/node_modules/vue/dist/vue.runtime.***mon.js)
- vue-template-***piler@2.6.11 (/Users/dx/Documents/2021works/TaiTaiLeYingXiaoPC/node_modules/vue-template-***piler/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-***piler.
If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-***piler to the latest.

原因就是vue-template-***piler要和vue版本一致。
网上的方法有:node_modules文件和package.lock-json文件,然后将package.json文件中的vue版本号的 ^ 去除掉。再重新npm install。但不行。

我的解决方法是,先找到项目下的node_modules,删除vue-template-***piler,之后再运行 npm i vue-template-***piler@2.6.14就解决了。

转载请说明出处内容投诉
CSS教程_站长资源网 » Vue packages version mismatch:VUE版本不匹配

发表评论

欢迎 访客 发表评论

一个令你着迷的主题!

查看演示 官网购买