简体   繁体   English

节点 cmd 在 fsevents 点执行“npm install”时挂起

[英]node cmd getting hangs while doing 'npm install' at fsevents point

i am trying to install anugalr2 through npm command "npm install".我正在尝试通过 npm 命令“npm install”安装 anugalr2。 but when it reaches some point that is in fsevets.但是当它达到 fsevets 中的某个点时。 the command prompt getting stuck.命令提示卡住。 nothing is happening after that.之后什么都没有发生。 PFb the cmd image PFb cmd 图片在此处输入图像描述

any suggestions /advice will be helpful任何建议/建议都会有所帮助

Update:更新:

when i try with npm i --no-optional .当我尝试使用npm i --no-optional it is getting stuck at ""core-js" package它卡在“”core-js” package

D:\Angular2\quickstart-master>npm i --no-optional
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or highe
to avoid a RegExp DoS issue
npm WARN deprecated express@2.5.11: express 2.x series is deprecated
npm WARN deprecated connect@1.9.2: connect 1.x series is deprecated
[            ......] - extract:core-js: sill pacote core-js@https://registry.n

after i cleaned npm cache it worked for me在我清理 npm 缓存后,它对我有用

npm cache clean --force

As @RidgeA said in their comment...正如@RidgeA 在他们的评论中所说......

Use npm i --no-optional .使用npm i --no-optional This will not install optional dependencies, one of which is fsevents .这不会安装可选的依赖项,其中之一是fsevents The reason it is getting stuck is because fsevents is written for Mac (see https://www.npmjs.com/package/fsevents ).它卡住的原因是fsevents是为 Mac 编写的(参见https://www.npmjs.com/package/fsevents )。

I can see your path is not that long but in my case a problem was with a too long path.我可以看到您的路径并不长,但就我而言,问题在于路径太长。

So the solution was to move project to a location with shorter path, like: D:\\my-project\\所以解决方案是将项目移动到路径较短的位置,例如: D:\\my-project\\

I managed to install without problems after moving the project to a folder with a shorter path.将项目移动到路径较短的文件夹后,我设法安装没有问题。 C:\\Themes C:\\主题

After updating npm version I forgot about this problem.更新 npm 版本后我忘记了这个问题。

npm won't work if you try to install on USB devices, try changing the directory to your hard drive.如果您尝试在 USB 设备上安装,npm 将不起作用,请尝试将目录更改为您的硬盘驱动器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM