32

Trying to do npm install steroids -g and running into lots of errors of two types:

First: 500

npm ERR! registry error parsing json
npm http 500 https://registry.npmjs.org/cardinal
npm ERR! registry error parsing json
npm http 500 https://registry.npmjs.org/glob
npm ERR! registry error parsing json
npm http 500 https://registry.npmjs.org/chmodr
npm ERR! registry error parsing json
npm http 500 https://registry.npmjs.org/fstream
npm ERR! registry error parsing json

when I visit those urls in the browser I get the following message:

Internal routing error

Sorry, we cannot connect to the intended server.

We have just been notified of this problem. We will correct it as soon as possible.

Feel free to contact us if you have any questions: support@iriscouch.com

Second: 503

npm http 503 https://registry.npmjs.org/forever-agent
npm ERR! registry error parsing json
npm http 503 https://registry.npmjs.org/cheerio
npm ERR! registry error parsing json
npm http 503 https://registry.npmjs.org/request
npm ERR! registry error parsing json
npm http 503 https://registry.npmjs.org/diff
npm ERR! registry error parsing json
npm http 503 https://registry.npmjs.org/tar

When I visit those urls in the browser I get this message:

Error 503 backend read error

backend read error

Guru Meditation:

XID: 1448084160

Varnish cache server

Does this mean the npm registry is down? or do I have strange behavior on my machine?

Running node v.0.10.24 & npm v.1.3.21

Brett DeWoody
  • 59,771
  • 29
  • 135
  • 184
alnafie
  • 10,558
  • 7
  • 28
  • 45
  • 2
    npm does go down from time to time. The load it is under is extraordinary. It's worth checking its Twitter feed at https://twitter.com/npmjs. – juanpaco Jan 14 '14 at 20:03
  • I still find it redonculous that npm isn't handling the 5** codes and tries to parse the response as JSON instead. – kub1x Nov 28 '16 at 10:05

3 Answers3

48

Try using a mirror for example the european mirror:

npm --registry http://registry.npmjs.eu/ install karma
josketres
  • 3,329
  • 1
  • 26
  • 23
  • 1
    +1 @joketres! Good to know! RaphaelDLL's answer is true - should check twitter before asking on SO - but your hint is useful for "what to do if it is indeed down?" – apprenticeDev Jan 14 '14 at 21:02
  • Looks like it's down again; this fixed it for me. npm puts the full HTTP error message into npm-debug.log. – EthernetCable Jan 28 '14 at 23:39
  • 3
    To make this permanent, run `npm config set registry http://registry.npmjs.eu` Beware that you cannot publish packages to a mirror. http://shapeshed.com/using-the-european-npm-mirror/ – sigurdga Jun 04 '14 at 13:27
  • Thank you, @sigurdga! I tried publishing to a mirror and got error 405 - "Not Allowed". I have not been able to publish all day. Very annoying, when working on dependencies of other projects. – Domi Aug 04 '14 at 12:10
16

From @npmjs around 15mins after your question was made:

"aware of the outage. please be patient. working to resolve this now."

On side note, read Node Roundup: Surviving npm Downtime, Waf Wall of Shame, stream-chat, Vein, interest info about NPM mirrors. Kinda outdated (2012) but now you know it has mirrors ;-)

Also, a good advice by 'mark' at the comments of this blogpost I linked:

If you're relying on NPM for production deployments, STOP! Make sure you set specific versions and clone them in your private repo. Deploy from your private repo not the NPM registry. You have been warned. Relying on NPM for production deployment scripts has bitten us twice! The first was because a library author deleted an old version of his library we depended on. This time it was the NPM registry itself.

RaphaelDDL
  • 4,452
  • 2
  • 32
  • 56
  • It's very confusing when it's not clear why something isn't working and it turns out to be a one off thing like the registry server being down! – alnafie Jan 14 '14 at 20:31
1

npm has a status page where any server incidence will (should) be reflected:

https://status.npmjs.org

AxeEffect
  • 6,345
  • 4
  • 37
  • 33