A few short years ago [1] when I started to explore Node.js [2], I remember the installation on my MacBook Pro required downloading the source, compiling and installing it, and then updating paths. And then you had to install NPM [3].
Since then, Node [4]’s installation has been come tremendously easy and NPM is even bundled with Node [5]. And yet, installing Node (and keeping up w/its rapid release schedule) is even easier with a nifty tool: Node Version Manager [6].
With Node Version Manager (or nvm [7]) you can be up and running with Node in 3 easy commands.
Step 1: Download and install nvm.
Step 2: Reload your shell.
1
source .bash_profile
Step 2.5: Obtain a list of available node versions to install.
1
nvm ls-remote
Step 3: Install your desired version of node.
1
nvm install v0.10.0
After that’s done, execute a node -v to verify. Now wasn’t that easy? You bet!
Links:
[1] http://www.javaworld.com/community/node/8140
[2] http://nodejs.org/
[3] https://npmjs.org/
[4] http://www.ibm.com/developerworks/library/j-nodejs/
[5] http://www.ibm.com/developerworks/offers/lp/demos/summary/j-jnodejs.html?ca=drs-
[6] https://github.com/creationix/nvm
[7] https://twitter.com/aglover/status/105824835149627392
[8] https://raw.github.com/creationix/nvm/master/install.sh