Jump to content

Node.js - React - Next.js

From Sinfronteras
Revision as of 11:16, 13 February 2026 by Adeloaleman (talk | contribs) (Node.js)

Node.js

Versions:

 
18 (18.20.8)  LTS: Safe, widely compatible
20 (20.20.0)  LTS: Mature, very stable. A good choice today
22 (22.22.0)  LTS: Also stable. A good choice today
24            LTS: Early adopter / forward-looking

On Ubuntu 25, the clean and reliable way to handle multiple Node.js versions is to use NVM (Node Version Manager).

Install NVM

curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh  | bash  # Lasted
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash  # If you want a specific version
source ~/.bashrc
nvm -v
 
nvm install 18             # Install multiple Node versions
nvm install 20.20.0

nvm ls                     # List versions
nvm uninstall 20.20.0      # Remove versions

nvm alias default 20.20.0  # Set a default
nvm use default            # Set the one used on the current terminal

nvm use 18                 # Switch versions
nvm use 20.20.0

Per-project version. Inside a project directory:
cd mi_proyecto
echo "20.20.0" > .nvmrc
nvm use
npm install