Node 25 on RL 10

hello -

i was installing node on RL-10 in my “usual” way using modules, but received a message saying modules were being deprecated:

WARNING: modularity is deprecated, and functionality will be removed in a future release of DNF5.

so i just did a simple: dnf –assumeyes install node; and it installed node v22. from what i saw, node v22 has already just fallen into a maintenance mode.

according to Node.js — Download Node.js® , i should do the following:

/usr/bin/curl --output - https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash ;nvm install 25 ;

This certainly worked, but i would MUCH rather use dnf if possible.
Also using this command installed node into /root/.nvm/versions/node/v25.1.0/bin/npm, not in the standard directories like /usr/bin'

Any opinions or thoughts? I don’t absolutely need the latest-n-greatest, but i generally try to stay current.

SCRATCH earlier post, this looks like what i need.

curl --silent --location https://rpm.nodesource.com/setup_22.x | bash - ;
dnf  -assumeyes install nodejs  ;

this installs the latest into /usr/bin.

any opinions?

You don’t need to use the curl command. NodeJS 22.19 is already available by default in AppStream.

[root@rkelb ~]# dnf list node*
UpWare Repository                                                                        29 kB/s | 1.5 kB     00:00    
Available Packages
nodejs.x86_64                                        1:22.19.0-2.el10_0                                        appstream
nodejs-devel.x86_64                                  1:22.19.0-2.el10_0                                        appstream
nodejs-docs.noarch                                   1:22.19.0-2.el10_0                                        appstream
nodejs-full-i18n.x86_64                              1:22.19.0-2.el10_0                                        appstream
nodejs-libs.x86_64                                   1:22.19.0-2.el10_0                                        appstream
nodejs-nodemon.noarch                                3.0.3-5.el10                                              appstream
nodejs-npm.x86_64                                    1:10.9.3-1.22.19.0.2.el10_0                               appstream
nodejs-packaging.noarch                              2023.10-9.el10_0                                          appstream

so it’s enough to just do:

dnf install nodejs

ya my original method did install v22 just fine, but i mentioned my concern about installing a release that appears to be going obsolete so quickly. that i why i wanted to install v25.

The script installs a repo under /etc/yum.repos.d for you to install the newer community version of NodeJS, which is fine too. So it just depends what version you want.

RHEL backports fixes, so if something needs to be applied to NodeJS 22 then they will do it. But obviously if you need to install stuff with npm that requires a version higher than 22, then that would be the only real issue.

1 Like

one of the reasons i am migrating is that my php is obsolete. so on the new server, i am trying to keep whatever is installed as current as possible. this link seems to indicate that v22 wont receive any more updates.

it gets frustrating when a new node package wont run because my node is old.

Yep, it happens. Remi has a PHP repo so that you can stay up-to-date. And I also use the nodejs from nodesource by running the script and adding it. Be it on Rocky or Debian, as I use both.

If you will still be using PHP take a look at: https://blog.remirepo.net/

1 Like

well truth-be-told, when i installed virtualmin/webmin on RL back when RL was first released, webmin was not really quite ready for RL. and i have been living with little issues ever since.

so this is an excuse to go up on RL-10, php 8.5 and node 25 all at one.

i am still trying to determine if there is any downside to installing v25 this way. seems to me so long as dnf is somehow involved, there would be little downside.