码迷,mamicode.com
首页 > 其他好文 > 详细

vue创建项目报错显示vue 和 vue-template版本不同

时间:2020-02-09 20:35:43      阅读:101      评论:0      收藏:0      [点我收藏+]

标签:cnp   错误   color   创建   span   pil   重新安装   alt   vue   

技术图片

 

 既然是版本不一致,那么只需要把vue与vue-template-compiler的版本更新为一致的就行了

第一种办法:

更新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到与vue-template-compiler同版本

cnpm install vue@2.6.10 --save

如果安装后还是出现相同的报错,有可能是vue的安装与运行环境不符,可尝试加上 `-g` 再装一遍

cnpm install vue@2.6.10 --save -g

 

vue创建项目报错显示vue 和 vue-template版本不同

标签:cnp   错误   color   创建   span   pil   重新安装   alt   vue   

原文地址:https://www.cnblogs.com/xiongying4/p/12288451.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!