2019-04-19 npm install vue-router --save时报错

F:\vue实战\gshop-client>npm install vue-router --save
npm ERR! path F:\vue实战\gshop-client\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 'F:\vue实战\gshop-client\node_modules\fsevents\node_mo
dules'
npm ERR!  { Error: EPERM: operation not permitted, lstat 'F:\vue实战\gshop-client\node_modules\fsevents\node
_modules'
npm ERR!   stack: 'Error: EPERM: operation not permitted, lstat \'F:\\vue实战\\gshop-client\\node_modules\\f
sevents\\node_modules\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'lstat',
npm ERR!   path: 'F:\\vue实战\\gshop-client\\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\zhanglun\AppData\Roaming\npm-cache\_logs\2019-04-19T08_28_23_481Z-debug.log

解决的方法:

npm install -g vue-router --save
然后再
npm install  vue-router --save
就可以了 ,看看package.json里面dependencies里面有没有vue-router

你可能感兴趣的:(2019-04-19 npm install vue-router --save时报错)