首先查看项目根目录下是否生成过package-lock.json的文件,若有,删之。然后删除整个node_modules目录,重新配置package.json(当然,要记得统一vue和vue-template-compiler的版本)配置好之后重新执行:npminstall;OK,问题解决。element饿了么的vue框架,运行报错已解决,Vue2.1.5将_h重命名为_c,而Elemen...
第一步:执行npm uninstall vue-template-compiler 第二步:执行npm install vue-template-compiler@报错中提示的vue的版本号 本次执行npm install vue-template-compiler@2.6.14
第一种办法: 更新vue-template-compiler到与vue同版本 把vue-template-compiler卸载(cnpm uninstall vue-template-compiler), 再重新安装一个与vue版本一致的vue-template-compiler(cnpm install vue-template-compiler@报错中提示的vue-template-compiler的版本号,这里是2.6.10 ) 但是我发现这个办法并行不通,还是报相同...
vue@2.6.12 (/Users/work_ws/project/my/astar-education/astar-education-ui/node_modules/vue/dist/vue.runtime.common.js) vue-template-compiler@2.6.13 (/Users/work_ws/project/my/astar-education/astar-education-ui/node_modules/vue-template-compiler/package.json) This may cause things to work in...
报错原因:通常出现于一些依赖库的更新或者安装新的依赖库之后(可以认为npm update已经成为一种习惯),导致了vue和vue-template-compiler的版本不一致。 解决方案:统一vue和vue-template-compiler的版本 "vue":"2.3.3","vue-template-compiler":"2.4.4",
npm uninstall vue-template-compiler卸载掉当前的, npm i vue-template-compiler@当前的版本号 --save重新安装,呵,安装倒是成功了,可是版本显示压根没改,还是不一致 !成,我再换一种方式 将package.json里的这两个版本强行给你改一致了,删掉node_modules重新下,还是不行 ...
很久没有使用vue了,今天需要创建一个mxgraph与vue集成的项目,查看了一下vue-cli的版本,发现还是2.9.10的,于是升级vue-cli到最新版本。然后执行vue create vuegraph 创建新的项目,发现出现错误,错误是vue的版本与vue-template-complier的版本冲突,提示中给出了解决方案,如果vue-loader版本>=10.0,该如何,如果<10.0,...
在Vue 3 中,vue-template-compiler 已经被替换为 @vue/compiler-sfc。因此,对于 Vue 3.1.5 版本,你应该使用 @vue/compiler-sfc 而不是 vue-template-compiler。 以下是一些关于 Vue 3 和 @vue/compiler-sfc 的关键点: Vue 3 中的编译器: 在Vue 3 中,单文件组件(SFC)的编译工作由 @vue/compiler-sfc...