[英]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: 我试图通过npm在项目上安装lodash,每次尝试为我的项目安装lodash时都会得到此错误:
D:\\github\\sandbox\\NgRx-Store>npm install --save lodash npm ERR!
D:\\ github \\ sandbox \\ NgRx-Store> npm install-保存lodash npm ERR! path D:\\github\\sandbox\\NgRx-Store\\node_modules\\fsevents\\node_modules\\aws-sign2\\package.json npm ERR!
路径D:\\ github \\ sandbox \\ NgRx-Store \\ node_modules \\ fsevents \\ node_modules \\ aws-sign2 \\ package.json npm ERR! code EPERM npm ERR!
代码EPERM npm ERR! errno -4048 npm ERR!
errno -4048 npm错误! syscall unlink npm ERR!
syscall取消链接npm ERR! Error: EPERM: operation not permitted, unlink 'D:\\github\\sandbox\\NgRx-Store\\node_modules\\fsevents\\node_modules\\aws-sign2\\package.json' npm ERR!
错误:EPERM:不允许该操作,请取消链接“ 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!
{错误:EPERM:不允许执行操作,请取消链接'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!
堆栈:'错误:EPERM:不允许操作,取消链接\\'D:\\ github \\ sandbox \\ NgRx-Store \\ node_modules \\ fsevents \\ node_modules \\ aws-sign2 \\ package.json \\'',npm ERR! errno: -4048, npm ERR!
errno:-4048,npm错误! code: 'EPERM', npm ERR!
代码:“ EPERM”,npm错误! syscall: 'unlink', npm ERR!
syscall:'unlink',npm ERR! path: 'D:\\github\\sandbox\\NgRx-Store\\node_modules\\fsevents\\node_modules\\aws-sign2\\package.json' } npm ERR!
路径:“ D:\\ github \\ sandbox \\ NgRx-Store \\ node_modules \\ fsevents \\ node_modules \\ aws-sign2 \\ package.json'} npm ERR! npm ERR!
npm ERR! Please try running this command again as root/Administrator.
请尝试以root / Administrator身份再次运行此命令。
npm ERR! npm ERR! A complete log of this run can be found in: npm ERR!
可以在以下位置找到该运行的完整日志:npm ERR! C:\\Users\\Perry Craft\\AppData\\Roaming\\npm-cache_logs\\2017-09-10T21_35_04_683Z-debug.log
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. 有没有其他方法可以将lodash和@ types / lodash安装到Angular 4项目中。
Same thing happened with me. 我也发生了同样的事情。 So, Try re-installing NodeJS and run
npm install
again. 因此,尝试重新安装NodeJS并再次运行
npm install
。 After that try, npm i -g npm
and finally install npm i --save lodash
. 在尝试之后,
npm i -g npm
并最终安装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. 否则,请尝试从https://lodash.com/在本地下载文件,或尝试使用CDN。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.