Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are there 4 versions of Node JS?

Tags:

node.js

Why are there (as of right now) four "current" versions of NodeJS?

  • 0.10.41 (Maintenance)
  • 0.12.9 (LTS)
  • 4.2.3 Argon (LTS)
  • 5.1.1 (Stable)

According to the NodeJS release page, all of those were released on December 3rd. But what is the difference? Which should I use?

like image 440
Adam Haile Avatar asked Dec 09 '15 01:12

Adam Haile


People also ask

Can I have 2 versions of node?

NVM allows installing multiple node js versions on the same machine and switching between the required node js version.

What are the versions of nodejs?

js v18 is the Current version! Node. js 18 will be the 'Current' release for the next 6 months and then promoted to Long-term Support (LTS) in October 2022.

Which version of node js is better?

LTS version focus on stability and more reliable application for any scale. According to the Node. js blog, the “LTS version guarantees that the critical bugs will be fixed for a total of 30 months and Production applications should only use Active LTS or Maintenance LTS releases”.

Should I use node 14 or 16?

Which Node JS version to use? 16 LTS. You should always use even-numbered versions marked LTS that says “Recommended for Most Users” on the download page. An even number Node version is 14.


1 Answers

LTS vs Stable

  • LTS (Long Term Support): Mature and dependable. Proven stability and a commitment to keep it that way.
  • Stable: Latest features. Usable in production, but not recommended for those who don't need those features and require dependability.

NodeJS vs IoJS

IoJS was a fork of NodeJS to update the V8 engine and bring in ES6 support. Those two communities voted to merge, and now IoJS features have been brought into Node starting with 4 which came out in September. The reason the version format changed so drastically was because they adopted IoJS's use of semver. Versions 1 to 3 are IoJS releases. You can more or less ignore IoJS at this point.

As I mentioned, 4 is the the latest LTS release, and 5 is the latest Stable release.

Pre-IoJS

Prior to the merge, NodeJS 0.10 was an LTS and 0.12 was Stable. Now, 0.12 is an LTS, and 0.10 is just an old version for maintenance. I don't have any facts or figures on commitments to 0.10.

Which to use

You should consider your target audience and the environment you have available to you.

If your environment allows for NodeJS 4.x or later (i.e. if your host environment supports it), and you have no problems with dependency compatibility on that version, feel free to target the latest LTS if you are working on a production application or module where dependability and stability are paramount, or 5 if you need or can accept the latest and greatest. If you have compatibility issues with NodeJS 4 or later, use 0.12.

More info.

How to manage multiple versions of NodeJS

You may run into the issue where you installed the latest and greatest Node and your project won't work, or conversely, you need an older version installed for one project but would like to use a newer version for another.

Enter NVM, which is a bash utility that lets you install and switch to different node versions either using the command line, or dropping a settings file into your project to let it automatically switch for you. Note that NVM is Linux/OSX only; See the NVM readme for a list of Windows-compatible analogs.

like image 70
moribvndvs Avatar answered Sep 21 '22 12:09

moribvndvs