0

I want to install nodejs 18 using the DNF installer, but the default is set to stream 10. How can I change it to select version 18 when installing?

Commands used:

sudo dnf module install nodejs
sudo dnf module install nodejs-18
sudo dnf module install nodejs@18

Any idea what I am missing?

Tried to install nodejs 18, but when I used the following command:

sudo dnf module install nodejs

Only nodejs 10 is installing.

cyqsimon
  • 2,752
  • 2
  • 17
  • 38

1 Answers1

1

First, you need to check available node versions on your server.

dnf module list nodejs

You can view the enabled node version with [e]. Now you need to reset your node version

dnf module reset nodejs

After that, you can enable your preferred node version with this command.

dnf module enable nodejs:18
Udara Suranga
  • 123
  • 2
  • 4
  • 13