How to Upgrade Node.js

From the command line, use the following steps to upgrade Node.js to the latest version using TJ Holowaychuk’s (visionmedia) n module.

From the Readme.md out on GitHub, the “n” module is a:

Simple flavour of node binary management, no subshells, no profile setup, no convoluted api, just simple.

First, clear NPM’s cache:

sudo npm cache clean -f

Next, install the “n” module:

sudo npm install -g n

To upgrade Node.js to the latest version, use:

sudo n stable

To upgrade Node.js to a specific version, use:

sudo n 0.10.32

Check the version:

node -v

v0.10.32

Like this:

Tags: , , ,

%d bloggers like this: