Report this

What is the reason for this report?

question about bower tutorial

Posted on November 26, 2013

When I try to run the command npm install -g bower from this Bower tutorail https://www.digitalocean.com/community/articles/how-to-install-and-use-bower-on-your-vps I get the errors you see below. Any ideas what the problem might be?

npm http 304 https://registry.npmjs.org/tar npm http 304 https://registry.npmjs.org/unzip npm http 304 https://registry.npmjs.org/tmp npm http 304 https://registry.npmjs.org/update-notifier npm http 304 https://registry.npmjs.org/which npm ERR! Failed to parse json npm ERR! Unexpected end of input npm ERR! File: /home/michael/.npm/rimraf/2.2.2/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! System Linux 3.8.0-19-generic npm ERR! command “/usr/bin/node” “/usr/bin/npm” “install” “-g” “bower” npm ERR! cwd /home/michael npm ERR! node -v v0.10.22 npm ERR! npm -v 1.3.14 npm ERR! file /home/michael/.npm/rimraf/2.2.2/package/package.json npm ERR! code EJSONPARSE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/michael/npm-debug.log npm ERR! not ok code 0



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Try clearing npm’s cache: <br><pre>mv /home/michael/.npm /home/michael/.npm.backup</pre> <br>And then run <code>npm install -g bower</code> again, does that work? <br> <br>If not, what’s the output of <pre>node -v</pre>?

Clearing the cache did the trick. Thanks. <br> <br>Node v0.10.22

Sweet! :]

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.