kovogel kovogel - 3 months ago 10
Node.js Question

npm "failed to parse json"

When I'm trying to install express with npm I always get the following error:

Failed to parse json
No data, empty input at 1:1
File: /root/.npm/inherits/2.0.1/package/package.json
Failed to parse package.json data.
package.json must be actual JSON, not just JavaScript.

This is not a bug in npm.
Tell the package author to fix their package.json file. JSON.parse


What am I doing wrong?

sudo npm install -g express


OS is Ubuntu 12.04 (precise) armhf

Answer

Thanks to Jivings from the comments:

npm cache clean

solved the problem

Comments