How to figure out why does the npm hang?

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?


Solution 1:

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: