Installing iojs and Node.js Together

iojs

If you're even remotely involved with the Node community at all, you've likely heard about a fork (of sorts) that has been in process for the past several months. That fork is iojs, and it aims to try out an open-governance model that the Node/iojs community has more ownership of (rather than waiting on Joyent). There's a great NodeUp podcast that you can listen to if you want to get more if the inside scoop on iojs.

In a nutshell: iojs means there will also be more frequent stable releases, ES6 support,updated versions of V8, and Semantic Versioning. And all this in more predictable release cycles.

So how you get it onto your machine? There are several installers available, but I would strongly recommend sandboxing your installation of it, at least for the time being. You probably shouldn't be using it in production if your job depends on it. If not, go for it! Just be smart, it's not perfect (yet?). A few build processes I had failed when I was playing around with it the other day.

Use NVM

I highly recommend using a package manager like Homebrew. It's easy to clutter your machine with a permissions/module nightmare if you aren't careful. Homebrew is one solution, but there are others. You can get it with:

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then you can install NVM (node version manager):

    brew install nvm

nvm ls-remote should give you a list of all available node builds as well as the most recent iojs ones:

Then it's as easy as:

    nvm install iojs

You have iojs! Welcome to freedom...at least until this fragmentation in the community ends (maybe? possibly? Who knows). Use nvm to install other versions or choose which version to use.

    nvm install [version]
    nvm current //--> returns currently-used version
    nvm ls //--> lists locally available versions

And bam. All the io.js goodness you can handle.