0
votes

I am trying to install lodash through npm on a project and every time I try to install it for my project I get this err:

D:\github\sandbox\NgRx-Store>npm install --save lodash npm ERR! path D:\github\sandbox\NgRx-Store\node_modules\fsevents\node_modules\aws-sign2\package.json npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall unlink npm ERR! Error: EPERM: operation not permitted, unlink 'D:\github\sandbox\NgRx-Store\node_modules\fsevents\node_modules\aws-sign2\package.json' npm ERR! { Error: EPERM: operation not permitted, unlink 'D:\github\sandbox\NgRx-Store\node_modules\fsevents\node_modules\aws-sign2\package.json' npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'D:\github\sandbox\NgRx-Store\node_modules\fsevents\node_modules\aws-sign2\package.json\'', npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'unlink', npm ERR! path: 'D:\github\sandbox\NgRx-Store\node_modules\fsevents\node_modules\aws-sign2\package.json' } 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\Perry Craft\AppData\Roaming\npm-cache_logs\2017-09-10T21_35_04_683Z-debug.log

Is there any ways to install lodash and @types/lodash another way it is for an Angular 4 project.

1
Seems that a problem with permissions, you are in windows, i don't know much about permissions in that, but maybe you can focus in what i'm sayingKalamarico
sandbox === vagrant?PlayMa256
sandbox is just the name of the folder when I am messing around maybe a tutorial or something new I learned and I am just trying it out. Never had a problem with permissions before but I didn't think about trying on a different project! I'll do that.Perry Craft

1 Answers

1
votes

Same thing happened with me. So, Try re-installing NodeJS and run npm install again. After that try, npm i -g npm and finally install npm i --save lodash. Hope this works for you also.


Otherwise, try downloading the file locally from https://lodash.com/ or try to use the CDN.