NodeJS version number confusion

I installed Node JS several months ago and played around a bit. Today, I wanted to start learning more about node and before coding, I decided I wanted to make sure I had the latest version.

I checked the version and it was something like v0.10.3x. I looked on the NodeJS website and it shows the latest version as v4.1.0. So I thought Woahhh! I better upgrade and I couldn't believe it moved that fast to a 4.x version in only a few months.

I spent quite some time trying to figure out how to completely uninstall node and npm because I couldn't seem to upgrade it.

Finally I got it all ripped out, then installed in on CentOS 7 using yum. I know I won't get the latest version through yum but, I figured it would be close enough.

After install, I am at v0.10.40.

I have a feeling I just don't understand something about NodeJS version numbers.


Yeah if you only used the official node.js runtime then it would have appeared to jump from 0.12.x all the way to 4.0.0 in one fell swoop. What you may not have known was that node devs that were sick of how much the node repository was stagnating made a fork of the project and called it io.js. Under the io.js name the project marched forward over the last six months or so; it started at v1.x and iterated all the way through 2.x and 3.x in that time. Old node.js used a different versioning system wherein the odd versions were unstable and even versions were stable. Io.js switched to using semver versioning semantics like packages on npm already use.

After a lot of deliberation Joyent (original maintainers of node.js) finally caved in and helped form a proper open committee around node in an effort to push the project forward in much the same way io.js was already doing. A few months ago they agreed to merge io.js back into node.js (which was the goal of those who created io.js in the first place). They finally finished merging the two projects recently. The name io.js is no more and node.js lives on starting at v4.0. It will continue to use semver semantics like io.js did :)

Going forward things with node will be MUCH simpler. I'm excited to see where the project goes from here.


That is because since v4.0, the Node.js project and the io.js project that are now combined. As for the io.js project, the version numbers were like v3.x, v2.x and v1.x.

Reference https://nodejs.org/en/blog/release/v4.0.0/


You can use NVM(Node Versioning manager) for avoiding confusion. Benefit of this package is you can switch b/w two versions according to your convenient. Its a very easy to use tool.

https://www.liquidweb.com/kb/how-to-install-nvm-node-version-manager-for-node-js-on-ubuntu-12-04-lts/


if you use npm you can upgrade with

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

once done try node -v to see what you got

see more at http://davidwalsh.name/upgrade-nodejs