27

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

So far I found following recipes:

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 npm@2.7.5 npm info using node@v0.12.0

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

Community
  • 1
  • 1
user656449
  • 2,950
  • 2
  • 30
  • 43
  • 1
    Might or moght not be relevant, but for the sake of people finding this question on google: try `npm config set maxsockets 20`. Lower the actual value as needed. I had to go to as low as `5` in my case – Mchl Jul 06 '16 at 07:19

3 Answers3

6

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:

Jack Shepard
  • 128
  • 8
Lucenty
  • 664
  • 1
  • 7
  • 18
  • Thank you for the idea! I tried it, doesn't affect the builld in any way though. I'm on ubuntu so it seems not to use the TEMP var (it wasn't set in my case at all). So far I'm getting the project built termninating hanged build and restarting it again several times. Looks like a network or npm server problem. Maybe npm starts too may network connections which my adsl modem can't process. – user656449 Apr 23 '15 at 07:30
0

Sometimes you need to use --force command to make sure the cache is cleaned: npm cache clean --force. Maybe related to this issue.

0

I tried all the above. I use homebrew and had to uninstall node / npm.

This worked for me:

  • brew install nvm
  • nvm install node

Afterwards npm started working again for me.

cr425
  • 1