Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to figure out why does the npm hang?

Tags:

npm

I'm suffering from the infamous npm install (update) hanging problem.

So far I found following recipes:

  • cleaned the cache: npm cache clean
  • deleted npm_modules in my project
  • set the registry to plain http (http://registry.npmjs.org/): npm config set registry http://registry.npmjs.org/
  • used --loglevel=verbose flag with npm install
  • increased number of connections as described here: Increasing the maximum number of tcp/ip connections in linux

Yet it still hangs. The position at which it hangs seems to be random. It can be npm verb get saving gulp-traceur to /home/me/.npm/registry.npmjs.org/gulp-traceur/.cache.json; or when installing npm verb afterAdd /home/me/.npm/q/0.9.7/package/package.json the last package downloaded is really random.

The versions are:

npm info using [email protected] npm info using [email protected]

So the question is if there is anything else I can do about it?

like image 423
user656449 Avatar asked Apr 03 '15 10:04

user656449


People also ask

Why is npm stuck?

Remove node_modules and package-lock. 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.

Why is npm slow?

If you find that npm is running slow and it isn't your computer or internet, it is most likely because of a severely outdated version.


1 Answers

I don't know if you have the same problem as I did but I can't make a comment to your question because I have not enough reputation.

Today somebody found solution to my similar problem. You can check it here:

like image 68
Lucenty Avatar answered Jan 09 '23 14:01

Lucenty