Difference between nodejs v0.12 and v5.x distributions
Asked Answered
C

2

9

I'm looking to install nodejs via Dockerfile to a debian based container. I'm a little confused about the different distributions out there. I've come to the conclusion that I want the latest STABLE distribution.

Now, in nodesource/distributions#deb there are four different distributions (v0.10, v0.12, v4.x, v5.x). As far as I understand, I need v5.x (by reading this blog post, among other random stuff I googled). But everywhere I look for, people recommend to install v0.12 (which also is the latest stable, or LTS, I'm not sure) even though in the nodejs.com official site distributions the release is as of this time v5.0.0.

So, I've got 2 possible ways of installing, any help (please elaborate a little bit, maybe this is a dumb question but it is kind of confusing to me)

curl -sL https://deb.nodesource.com/setup_5.x | bash -
apt-get install -y nodejs

or

curl -sL https://deb.nodesource.com/setup_0.12 | sudo -E bash -
sudo apt-get install -y nodejs
Cockleboat answered 5/11, 2015 at 18:19 Comment(7)
You should read the changelogs, as well as the complete version description and download the one that fits best to your needs. It's very hard to answer that question for someone else...Byran
@Michael If you don't know the answer (or about the subject asked) it doesn't mean "it's very hard to answer that question for someone else"Cockleboat
@Cockleboat A valid comment from Michael and completely unnecessary rudeness from your end.Deduct
@Michael sorry if I was rude, jan is right, sometimes an extra read on what I was about to comment is necessary, I apologize for that... But a great answer from someone that knew about the current state of the node project is valid too.Cockleboat
@Cockleboat no problem, I just didn't respond because I didn't want to start a unnecessary discussion. Still, I would suggest to really read the documentation on version 4 and 5. If you don't need to always have the latest es6 features you (maybe) better choose node 4 - as it is a LTS release with less frequent updates, while 5 is perfect for developing with the latest techs. That's why I said it's hard to answer for someone not knowing what you plan to do, which packages you intend to use and so on...Byran
Possible duplicate of Difference between 4.x LTS and 5.x Stable nodejs versionsAlastair
@Alastair i wouldn't think so, the last part of the question clarifies that i wanted to use either v0.12 or v5.x and was answered concisely by Hans... Maybe its just not as clearly written as I thought since there's already been some misunderstandings. The context I gave for my use case should've thrown some people off or they didn't read thoroughlyCockleboat
M
14

You should definitely not use any of the v0.x versions of Node.js as support for them are set to expire in 2016.

You should use either v4 (code name argon) which is the next LTS (long term support) version of Node.js or v5 which is the latest stable version.

Also, Node.js has an official Docker Image:

FROM node:5
Makeyevka answered 5/11, 2015 at 18:41 Comment(3)
Thanks! I'm using a different base image already, that's why I'm installing node manually... I'm not an experienced docker user, maybe theres a better way to solve the problem by using node's official image but for now I'm doing it this way :)Cockleboat
how did node move so quickly from 0.12.x to 4.x to 5.x in the span of a few months? totally lost o.oUno
@Uno Simple explaination: it was called io.js from 1.0.0 to 3.0.0. io.js was a fork on node.js. Read more on Node.js's website: nodejs.org/en/download/releasesDemmy
D
4

I'm new to node.js/npm and was confused by this as well. I'm installing on CentOS 7 using "yum install nodejs"

yum installs a 0.10 version of node.js

Then, when I npm installed another module, I saw some warning saying it wanted node.js >= 0.12... which led me to believe I needed v0.12... (Duh, 5.3.0 >= 0.12, but I was confused and scared at the time)

So google brought me to this question, and I followed Michaels advice.

I went and read the change log as suggested in his comment, and it's pretty clear that the version numbers are sequential, they just have some big jumps in a short amount of time:

v0.10.39 : 2015-06-18
...

v0.12.7 : 2015-07-09
...

v3.0.0 : 2015-08-04
...

v4.1.0 : 2015-09-17
...

v5.3.0 : 2015-12-16

Hope that helped.

Dibasic answered 18/12, 2015 at 7:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.