Why are there (as of right now) four "current" versions of NodeJS?
According to the NodeJS release page, all of those were released on December 3rd. But what is the difference? Which should I use?
NVM allows installing multiple node js versions on the same machine and switching between the required node js version.
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.
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”.
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With