报错
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。但不行。文章来源:https://www.toymoban.com/news/detail-646092.html
我的解决方法是,先找到项目下的node_modules,删除vue-template-compiler,之后再运行 npm i vue-template-compiler@2.6.14就解决了。文章来源地址https://www.toymoban.com/news/detail-646092.html
到了这里,关于Vue packages version mismatch:VUE版本不匹配的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!