Perry Craft
Perry Craft

Reputation: 309

npm lodash install issue?

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.

Upvotes: 0

Views: 6711

Answers (1)

Vishal Sholkay
Vishal Sholkay

Reputation: 83

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.

Upvotes: 1

Related Questions