Alastair Alastair - 2 years ago 118
Node.js Question

Using npm to install grunt on nodeenv results in findup-sync error

After establishing a node virtualenv using nodeenv, I use source /bin/activate
to switch into the correct directory, update npm, and execute

npm install -g grunt
npm install -g grunt-cli
and I recieve the same error:

npm ERR! Linux 3.13.0-53-generic
npm ERR! argv "node" "/home/{redacted-home-dir}/NodeProjects/vue/bin/npm" "install" "-g" "grunt-cli"
npm ERR! node v0.12.4
npm ERR! npm v2.11.1
npm ERR! file /home/{redacted-home-dir}/.npm/findup-sync/0.1.3/package/package.json
npm ERR! Failed to parse json
npm ERR! No data, empty input at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: /home/{redacted-home-dir}/.npm/findup-sync/0.1.3/package/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
npm ERR! Please include the following file with any support request:
npm ERR! /home/{redacted-home-dir}/NodeProjects/vue/npm-debug.log

A similar error was noted on the findup-sync Github, but this the most recent edition of npm.

Grunt's package.json says "approximately 0.1.2" according to the npm docs.

I also have tried installing findup-sync independently, to no avail.

Other details about my computer: Linux (Debian/Ubuntu 14.04). 64bit.

Answer Source

You have maybe a corrupted cache : npm cache clean

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download