node and iojs with nvm


NVM is a version manager for node.js just like RVM is for ruby. io.js is a fork of node which has more features than current node.js implementation. They may merge in the future.

I use both with NVM. I can switch between node and iojs as well as target specific versions of either one of them. Install NVM by following directions on its site.

I used Homebrew to install nvm.

brew install nvm

After installation is done…

// list all installed node versions on my machine (I have been using nvm...)
nvm ls
        v0.8.16
       v0.10.21
        v0.12.4
->       system
node -> stable (-> v0.12.4) (default)
stable -> 0.12 (-> v0.12.4) (default)
iojs -> iojs- (-> system) (default)

// check what node versions are available remotely
nvm ls-remote

// switch to iojs
nvm use iojs

// switch back to node
nvm use node

// install node version
nvm install v0.10.11

// switch to installed version
nvm use v0.10.11

// uninstall a node version
nvm uninstall v0.10.11

// uninstall nvm entirely
rm -rf ~/.nvm ~/.npm ~/.bower

These are simple and useful tasks. See nvm site for details.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s