Error npm install -g cordova ionic


#1
C:\Users\Lugo>npm install -g cordova ionic
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
C:\Users\Lugo\AppData\Roaming\npm\cordova -> C:\Users\Lugo\AppData\Roaming\npm\node_modules\cordova\bin\cordova
C:\Users\Lugo\AppData\Roaming\npm\ionic -> C:\Users\Lugo\AppData\Roaming\npm\node_modules\ionic\bin\ionic
npm ERR! path C:\Users\Lugo\AppData\Roaming\npm\node_modules\ionic\node_modules\fsevents\node_modules\dashdash\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall scandir
npm ERR! Error: EPERM: operation not permitted, scandir 'C:\Users\Lugo\AppData\Roaming\npm\node_modules\ionic\node_modules\fsevents\node_modules\dashdash\node_modules'
npm ERR!  { Error: EPERM: operation not permitted, scandir 'C:\Users\Lugo\AppData\Roaming\npm\node_modules\ionic\node_modules\fsevents\node_modules\dashdash\node_modules'
npm ERR!   stack: 'Error: EPERM: operation not permitted, scandir \'C:\\Users\\Lugo\\AppData\\Roaming\\npm\\node_modules\\ionic\\node_modules\\fsevents\\node_modules\\dashdash\\node_modules\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'scandir',
npm ERR!   path: 'C:\\Users\\Lugo\\AppData\\Roaming\\npm\\node_modules\\ionic\\node_modules\\fsevents\\node_modules\\dashdash\\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\Lugo\AppData\Roaming\npm-cache\_logs\2017-11-15T18_15_10_715Z-debug.log
npm ERR! path C:\Users\Lunpm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall scandir
npm ERR! Error: EPERM: opnpm ERR!  { Error: EPERM:npm ERR!   stack: 'Error:modules\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',npm ERR!   syscall: 'scannpm ERR!   path: 'C:\\Usenpm ERR!
npm ERR! Please try runni
npm ERR! A complete log onpm ERR!     C:\Users\Lug

#2

Your problem is probably with npm, something to do with permissions and files. This happens quite often and is almost impossible to successfully debug (at least here in the forum).

One solution: Uninstall your node, install nvm (or nvm-windows if you are on Windows), install a new node (which includes npm) with this, then install ionic and cordova again and try your command again. The problem should be gone.


#3

Gracias por responder, lo voy hacer