By m73mitchell
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!
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>?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.