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.
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.