Windows 10 1703
Node 6.11.2
npm 5.4.0
Everytime I try to install an npm package (ex: npm i gulp-notify), I receive the following error:
npm ERR! path C:\Users\web-dev\Desktop\barber\node_modules\fsevents\node_modules\ansi-regex\package.json
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\web-
dev\Desktop\barber\node_modules\fsevents\node_modules\ansi-regex\package.json' npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\web-dev\Desktop\barber\node_modules\fsevents\node_modules\ansi-regex\package.json'
npm ERR! at Error (native)
npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'C:\Users\web-dev\Desktop\barber\node_modules\fsevents\node_modules\ansi-regex\package.json\'\n at Error (native)',
npm ERR! errno: -4048,
npm ERR!
code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR!
path: 'C:\Users\web-dev\Desktop\barber\node_modules\fsevents\node_modules\ansi-regex\package.json' }
npm ERR! npm ERR! Please try running this command again as root/Administrator.
I ran cmd as administrator
I checked folder permissions
I cleared cache even though npm says it does it by itself
I changed npm prefix to C:\Users\User Name\AppData\Roaming\npm
Nothing helps.
Please advise.
Apparently I was trying to install packages locally instead of globally without the -g flag. Sorry about that. All is working now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With