Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

i am trying to install anugalr2 through npm command "npm install". but when it reaches some point that is in fsevets. the command prompt getting stuck. nothing is happening after that. PFb the cmd image enter image description here

any suggestions /advice will be helpful

Update :

when i try with npm i --no-optional. it is getting stuck at ""core-js" package

D:\Angular2\quickstart-master>npm i --no-optional
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or highe
to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: express 2.x series is deprecated
npm WARN deprecated [email protected]: connect 1.x series is deprecated
[            ......] - extract:core-js: sill pacote core-js@https://registry.n
like image 779
Kris Avatar asked Oct 24 '17 06:10

Kris


People also ask

What to do if npm install hangs?

To solve the issue, try removing the entire node_modules/ folder and the package-lock. json file. Then try running the npm install command again. That may fix the issue.

What is FSEvents npm?

The FSEvents API in MacOS allows applications to register for notifications of changes to a given directory tree. It is a very fast and lightweight alternative to kqueue. This is a low-level library.

Why npm install is not working?

The main cause of the npm command not found error is that npm is not installed. You can run the command “npm -v” to check whether npm is installed. If not, I recommend you uninstall Node. js and then reinstall node.


2 Answers

As @RidgeA said in their comment...

Use npm i --no-optional. This will not install optional dependencies, one of which is fsevents. The reason it is getting stuck is because fsevents is written for Mac (see https://www.npmjs.com/package/fsevents).

like image 109
Ethan Avatar answered Oct 04 '22 22:10

Ethan


after i cleaned npm cache it worked for me

npm cache clean --force

like image 28
Rohit Martires Avatar answered Oct 04 '22 22:10

Rohit Martires