Install Older Versions of NodeJS

NodeJS introduced some breaking changes in its 0.10 version. Because this breaks so many packages, I often need to install pre-0.10 versions of Node.

Here's how to do that in Ubuntu 12.04 server. It'll be short and sweet.

First, some dependencies, if you don't already have them:

$ sudo apt-get install wget build-essential

Second, grab whatever version of Node floats your boat, and install it. Here I'll grab the last version just before v0.10:

$ wget http://nodejs.org/dist/v0.9.9/node-v0.9.9.tar.gz
$ tar -xvf node-v0.9.9.tar.gz
$ cd node-v0.9.9
$ ./configure
$ make	                      # Go get your coffee, you got a few minutes
$ sudo make install   # Make sure to use sudo

If you run $ which node and $ which npm, you should see their locations on your system.

That's it, you're done!