当前位置:首页 » 《随便一记》 » 正文

Vue packages version mismatch:VUE版本不匹配

20 人参与  2024年02月13日 14:41  分类 : 《随便一记》  评论

点击全文阅读


报错

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.

在这里插入图片描述

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

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


点击全文阅读


本文链接:http://zhangshiyu.com/post/68365.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1