Thursday, September 5, 2013

Upgrading Node.js

I recently ran into a bug while running some npm tasks. The solution offered online was to upgrade Node.js to at least verison 0.10.15.

The easiest way to do this is with a package called n. It bills iteslf as a tool for simple node binary management and simple it is.

Install it with:

sudo npm install -g n

Then install whichever versions of Node.js you like:

n 0.10.15
n 0.9.6

choose from amongst installed versions by launching the app with no arguments:

n

and then using the up/down arrows to navigate amongst the installed versions

or install the latest version:

n latest

or the latest stable release:

n stable

Remove a version with:

n - 0.9.6

Overall, n makes managing Node.js versions a breeze.



No comments:

Post a Comment