npm “error parsing json” Foo

I finally got a chance to update my test installation of Ghost. But as usual Mr. Murphy thought it would be a good day to say hello.

When running the installation using npm I got a ton of errors. Here an excerpt:

...
npm http 500 https://registry.npmjs.org/commander/1.3.2
npm ERR! registry error parsing json
npm http 500 https://registry.npmjs.org/methods/0.1.0
npm ERR! registry error parsing json
npm http 500 https://registry.npmjs.org/range-parser/0.0.4
npm ERR! registry error parsing json
npm http 500 https://registry.npmjs.org/buffer-crc32/0.2.1
npm ERR! registry error parsing json
...

As usual, I checked first if the problem was on my end. Of course it wasn’t. This was just an issue with npm and switching to a different server (in npm speak a registry) solved the problem. In my case the European server worked. Here the call to install Ghost using the European registry:

npm --registry http://registry.npmjs.eu install --production

Happy haunting.