io.js is a node.js fork that just has been released in version 1.0 to strenghten community efforts, bring ES6 features to the node eco system quicker and speed up the development.
For this example I am using a virtual server on Digital Ocean, where I’m currently hosting all my node projects. With the referral link, you will get 10$ of credit with Digital Ocean, which could make their smallest VPS plan run for two months 🙂
Installing the io.js binary instead of node.js
Log in to your server or do this on your local Ubuntu / Linux Mint or other distribution machine.
To install the binary of io.js, just hit the download button on the website and pick the right platform, in my case that would be linux-x64. I simply copy the url of the file to your clip board or run the code below:
wget https://iojs.org/dist/v1.0.2/iojs-v1.0.2-linux-x64.tar.gz
tar zxf iojs-v1.0.2-linux-x64.tar.gz
cd iojs-v1.0.2-linux-x64
cp bin/* /usr/bin
Line by line it does the following:
- download the file
- decompress the archive with the io.js binary
- change directory to the uncompressed files
- copy everything from the
bin
folder to/usr/bin
Step 4 might vary based on your personal preference and your operating system. To check if you have io.js installed now, you can run node -v
. Basically what it does is that it copies the symlinks npm
, node
and the iojs executable to a path where they can be called as programs from any place in your terminal.
root@iojs:~/iojs-v1.0.2-linux-x64# node -v
v1.0.2
If the version shows v1.0.2
you probably did it just right.
Installing io.js with nvm, side by side with node.js
As this issue on the github repository of nvm shows, the developers are working on adding io.js support to nvm, so you will be able to install io.js in the future through nvm too.
In the future nvm install iojs/1.0.2
will most likely be possible, but is not supported yet.
Installing io.js on Arch Linux
Since the io.js package is already in the Arch User Repositories, you can install it through:
yaourt -S iojs
for a more recent version, do:
yaourt -S iojs-git
Summary
I must say the creators have made it really, really easy to install their node.js fork and it’s great to see the new ES6 features coming to the JavaScript on the server environment. What about you? Will you give io.js a shot?
Thank you for reading! If you have any comments, additions or questions, please leave them in the form below! You can also tweet them at me
If you want to read more like this, follow me on feedly or other rss readers
root@iojs:~/iojs-v1.0.2-linux-x64# node -v
v1.0.2
Shouldn’t this be “iojs -v”? I believe io.js currently ships Node v0.10.29
(Threw me off a bit)
not if you use the alias node->iojs that just links the binary I think, will test
Awesome thanks for this!
Great stuff! Thx.
Should leave a node for other users to browse
https://iojs.org/dist/ for the latest version
npm is throwing an error Error: Cannot find module ‘npmlog’. What should I do?