Install NodeJS and Bower on Ubuntu 12.04 Precise

Posted by Andrew McCombe on Tue Apr 29, 2014

I’m using Bower on a few projects at work to manage the JavaScript dependencies and it works perfectly for my needs. The only issue is that the websites are currently deployed on Ubuntu 12.04 and the packaged version of NodeJs is too old to install Bower.

The solution is to install Bower and NodeJS on Ubuntu 12.04 using the PPA provided by Chris Lea:

sudo add-apt-repository ppa:chris-lea/node.js 
sudo apt-get update
sudo apt-get -y install nodejs

When this has installed, check the version:

npm --version

Now install Bower:

sudo npm install -g bower

This will fetch and install Bower globally.