Question

question about bower tutorial

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

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Sweet! :]

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

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>?