在执行inoic创建项目时报错。主要错误是:operation not permitted, scandir
1 × Running command - failed! 2 [ERROR] npm ERR! path C:\Users\Administrator\cutePuppyPics\node_modules\fsevents\node_modules\dashdash\node_modul 3 4 npm ERR! code EPERM 5 npm ERR! errno -4048 6 npm ERR! syscall scandir 7 npm ERR! Error: EPERM: operation not permitted, scandir 8 ‘C:\Users\Administrator\cutePuppyPics\node_modules\fsevents\node_modules\dashdash\node_modules‘ 9 npm ERR! { Error: EPERM: operation not permitted, scandir 10 ‘C:\Users\Administrator\cutePuppyPics\node_modules\fsevents\node_modules\dashdash\node_modules‘ 11 npm ERR! stack: ‘Error: EPERM: operation not permitted, scandir 12 \‘C:\\Users\\Administrator\\cutePuppyPics\\node_modules\\fsevents\\node_modules\\dashdash\\node_modules\‘ 13 npm ERR! errno: -4048, 14 npm ERR! code: ‘EPERM‘, 15 npm ERR! syscall: ‘scandir‘, 16 npm ERR! path: 17 ‘C:\\Users\\Administrator\\cutePuppyPics\\node_modules\\fsevents\\node_modules\\dashdash\\node_modules‘ } 18 npm ERR! 19 npm ERR! Please try running this command again as root/Administrator. 20 21 npm ERR! A complete log of this run can be found in: 22 npm ERR! D:\nvmfile\npm-cache\_logs\2017-12-26T10_26_15_953Z-debug.log
解决方法:
1.清除C:\Users\Administrator\AppData\Roaming\npm下面的node_modules
2.将npm的缓存清除
3.将npm重新升级
npm install -g npm
4.重新执行 ionic start AppName
5.创建成功就或打开一个网页