[Package Request] - Node v22 and v24
What package is missing from Amazon Linux 2023? Please describe and include package name.
Node v22, which is the "current" version as of this request.
Is this an update to existing package or new package request?
An update.
Is this package available in Amazon Linux 2? If it is available via external sources such as EPEL, please specify.
Node v18 and v20 are already available in Amazon Linux 2023.
Any additional information you'd like to include. (use-cases, etc)
It'd be great if Amazon Linux included "current" versions of Node proactively. To be clear, I like that multiple versions are made available. That is, I like (a) having the new versions available and (b) that they aren't forced onto me.
Thanks!
Node 23 is now out, and 22 will enter Current LTS status by end of this month. It is extremely relevant to have it added as an official package.
https://openjsf.org/blog/announcing-node.js-23-key-features-and-enhancement
Node 22.11.0 is the current LTS now and 20 will eventually be phased out. Having 22 as an official package would be great!
https://aws.amazon.com/blogs/compute/node-js-22-runtime-now-available-in-aws-lambda/
Please to make it available via dnf please given its already packaged up in this image for lambda usage today.
Any update on when this will make it into AL2023 as a supported package?
Note that Node v24 is scheduled to become "current" in just a couple of months. I'll go ahead and update the issue title.
will become current soon, but won't be added to Lambda until back half of the year. Getting 22 added is more pressing at the moment.
I only want v22. I don't agree that v24 should be added before it's LTS. I use Amazon Linux 2023 because of its stability and expect all available packages to be LTS.
I don't agree that v24 should be added before it's LTS.
From my perspective I want it as an option. I like how right now I can explicitly install nodejs20, and I want that for nodejs22 and nodejs24 too. I particularly like the idea of explicitly being able to try out the Current release that isn't yet LTS, well before it turns into a default installation option.
Node 22 has now been the current LTS for almost half a year. Would it be possible to get some indication of where on the AL roadmap this is?
We are actively working on this. It should be out soon. We recently reworked how we package Node to make it easier to install mutliple versions and use update-alternatives to select the default, along with solving a number of other packaging issues. We have just released updated node18 and node20 packages accordingly and will release node22 shortly. We plan then to release new versions asap from that point onwards
@ozbenh Wonderful thank you. I hope that for docker something similar can be done that newer versions can come out sooner as well.
@ozbenh Great, thanks. Can you notify us here when node22 is available ?
@NicoAdrian nodejs22 is available on my stuff, looks like it became available in this update and uses alternatives for active version: 2023.7.20250414
https://docs.aws.amazon.com/linux/al2023/release-notes/relnotes-2023.7.20250414.html
Currently, AL2023 provides 3 versions of NodeJS: 18, 20, 22. All three packages use alternatives to automatically register/unregister the installed version to its configuration. It's not really important or interesting if only one version of NodeJS is installed, because all the "magic" is done in the background. But this little feature allows you to install, for example, all three versions on the same system at the same time, without any extra steps to make it possible. Everything is done by the rpm scriptlets during the install/upgrade/remove actions. However, only one version of NodeJS can be active, with its own namespaced location for globally installed node modules.
For example, if you are installing nodejs22 right now, it looks like this
$ cat /etc/amazon-linux-release
Amazon Linux release 2023.7.20250414 (Amazon Linux)
$ sudo dnf install -qy nodejs22
$ rpm -q nodejs22
nodejs22-22.14.0-1.amzn2023.0.1.aarch64
$ node -v; npm -v
v22.14.0
10.9.2
$ alternatives --display node
node - status is auto.
link currently points to /usr/bin/node-22
/usr/bin/node-22 - priority 100
slave npm: /usr/bin/npm-22
slave npx: /usr/bin/npx-22
slave npmrc: /etc/npmrc.nodejs22
slave node_modules: /usr/lib/nodejs22/lib/node_modules
Current `best' version is /usr/bin/node-22.
And if you also install, say, nodejs20, alternatives has to decide which version to automatically activate. Currently, NodeJS 18 has the highest priority, while NodeJS 20 and 22 have equal priority. This means that if alternatives is configured to be in auto mode for the node and all three are installed, then NodeJS 18 will be enabled by default. However, if only NodeJS 20 and 22 are installed on the same system, then the first one installed will remain active. This behavior can be changed at any time by configuring alternatives to be in manual mode for the node, which will allow you to pin any particular installed version and prevent the system from automatically activating another NodeJS version in case of its parallel installation.
$ sudo dnf install -qy nodejs20
$ rpm -q nodejs20 nodejs22
nodejs20-20.18.3-1.amzn2023.0.1.aarch64
nodejs22-22.14.0-1.amzn2023.0.1.aarch64
$ alternatives --display node
node - status is auto.
link currently points to /usr/bin/node-22
/usr/bin/node-22 - priority 100
slave npmrc: /etc/npmrc.nodejs22
slave npm: /usr/bin/npm-22
slave npx: /usr/bin/npx-22
slave node_modules: /usr/lib/nodejs22/lib/node_modules
/usr/bin/node-20 - priority 100
slave npmrc: /etc/npmrc.nodejs20
slave npm: /usr/bin/npm-20
slave npx: /usr/bin/npx-20
slave node_modules: /usr/lib/nodejs20/lib/node_modules
Current `best' version is /usr/bin/node-22.
$ node -v; npm -v
v22.14.0
10.9.2
$ sudo alternatives --set node /usr/bin/node-20
$ node -v; npm -v
v20.18.3
10.8.2
$ sudo alternatives --set node /usr/bin/node-22
$ node -v; npm -v
v22.14.0
10.9.2
$ alternatives --display node
node - status is manual.
link currently points to /usr/bin/node-22
/usr/bin/node-20 - priority 100
slave npmrc: /etc/npmrc.nodejs20
slave npm: /usr/bin/npm-20
slave npx: /usr/bin/npx-20
slave node_modules: /usr/lib/nodejs20/lib/node_modules
/usr/bin/node-22 - priority 100
slave npmrc: /etc/npmrc.nodejs22
slave npm: /usr/bin/npm-22
slave npx: /usr/bin/npx-22
slave node_modules: /usr/lib/nodejs22/lib/node_modules
Current `best' version is /usr/bin/node-20.
Notice that node status has now changed to manual from auto
All these commands are also available in the official documentation: https://docs.aws.amazon.com/linux/al2023/ug/nodejs.html.
FYI Node 24 is now officially the latest LTS
https://github.com/nodejs/node/releases/tag/v24.11.0