首页 > 编程 > JavaScript > 正文

详解关于Vue版本不匹配问题(Vue packages version mismatch)

2019-11-19 12:55:32
字体:
来源:转载
供稿:网友

今天再npm run dev时遇到一个错误:


由于当时vue版本已经到2.9.2版本。按照提示更新,无果。随后发现时由于weex环境的问题。只要巡行以下代码

weex xbind repair toolkit-repairweex repair


即可解决npm run dev无法启动的问题。

补充:

1、npm install vue-template-compiler@2.5.3 出现此问题

npm ERR! path G:/XXX.Web/node_modules/fsevents/node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall lstat
npm ERR! Error: EPERM: operation not permitted, lstat 'G:/XXX.Web/node_modules/fsevents/node_modules'
npm ERR!  { Error: EPERM: operation not permitted, lstat 'G:/XXX.Web/node_modules/fsevents/node_modules'
npm ERR!   stack: 'Error: EPERM: operation not permitted, lstat /'G://XXX.Web//node_modules//fsevents//node_modules/'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'lstat',
npm ERR!   path: 'G://XXX.Web//node_modules//fsevents//node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:/Users/Administrator/AppData/Roaming/npm-cache/_logs/2018-03-15T07_11_27_516Z-debug.log

解决方式:

npm install weex-toolkit -g

 2、Error: EPERM: operation not permitted

npm ERR! Error: EPERM: operation not permitted, scandir 'G:/XXX.Web/node_modules/fsevents/node_modules/getpass/node_modules'
npm ERR!  { Error: EPERM: operation not permitted, scandir 'G:/XXX.Web/node_modules/fsevents/node_modules/getpass/node_modules'
npm ERR!   stack: 'Error: EPERM: operation not permitted, scandir /'G://XXX.Web//node_modules//fsevents//node_modules//getpass//node_modules/'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'scandir',
npm ERR!   path: 'G://XXX.Web//node_modules//fsevents//node_modules//getpass//node_modules' }

解决方式:

npm cache clean --force

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持武林网。

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表