第一步:执行npm uninstall vue-template-compiler 第二步:执行npm install vue-template-compiler@报错中提示的vue的版本号 本次执行npm install vue-template-compiler@2.6.14
最后,安装匹配版本的vue和vue-template-compiler。例如,如果你决定使用vue的2.6.12版本,你可以运行以下命令: bash npm install vue@2.6.12 --save npm install vue-template-compiler@2.6.12 --save-dev 这将确保vue和vue-template-compiler的版本一致,从而解决版本不匹配的问题。 通过上述步骤,你应该能够解决vue和...
在Vue项目中,可以通过以下步骤来设置vue-template-compiler选项: 打开项目的配置文件,通常是vue.config.js或webpack.config.js。 在配置文件中找到相关的配置项,一般是module.rules或rules。 在配置项中找到处理.vue文件的规则,一般是使用vue-loader或类似的加载器。
报错原因:通常出现于一些依赖库的更新或者安装新的依赖库之后(可以认为npm update已经成为一种习惯),导致了vue和vue-template-compiler的版本不一致。 解决方案:统一vue和vue-template-compiler的版本 "vue":"2.3.3","vue-template-compiler":"2.4.4", 查了并试了一下只要运行两个代码就行了 npm instll npmupda...
Module build failed: Error: Cannot find module 'vue-template-compiler' 报错原因:通常出现于一些依赖库的更新或者安装新的依赖库之后(可以认为npm update已经成为一种习惯),导致了vue和vue-template-compiler的版本不一致。 解决方案:统一vue和vue-template-compiler的版本 ...
1Module build failed: Error: Cannot find module 'vue-template-compiler' 报错原因:通常出现于一些依赖库的更新或者安装新的依赖库之后(可以认为npm update已经成为一种习惯),导致了vue和vue-template-compiler的版本不一致。 解决方案:统一vue和vue-template-compiler的版本 ...
npm i vue-template-compiler@当前的版本号 --save重新安装,呵,安装倒是成功了,可是版本显示压根没改,还是不一致 !成,我再换一种方式 将package.json里的这两个版本强行给你改一致了,删掉node_modules重新下,还是不行 接连换了好几种方式,都是版本改不掉(如果你们采取了上面的方法直接解决了那更好,要是解决...
解决⽅案:统⼀vue和vue-template-compiler的版本 "vue": "2.3.3","vue-template-compiler": "2.4.4",查了并试了⼀下只要运⾏两个代码就⾏了 npm instll npm update 先运⾏npm install 之后会换⼀种报错:Vue packages version mismatch 这种是重新安装了依赖,但是还没有更新 在接着运⾏...
vue项目启动报错 vue与vue-template-compiler版本不一致,【代码】vue项目启动报错vue与vue-template-compiler版本不一致。Thismaycausethingstoworkincorrectly.Makesur
出现vue 与vue-template-compiler版本不一致提示如下图。 解决方案: 在vue2的解决方案是 保持 vue 跟 vue-template-compiler版本一致即可解决。 而在vue3 里面,已经不是用 vue-template-compiler了,是用另外一个包了 @vue/compiler-sfc,而且vue-loader要指定16以上的版本。 参考:https://segmentfault.com/q/101...