Jump to content

Node.js - React - Next.js

From Sinfronteras
Revision as of 16:10, 12 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

Install multiple Node versions

nvm install 18
nvm install 20.20.0

List versions

nvm ls

Remove versions

nvm uninstall 20.20.0

Set a default

nvm alias default 20.20.0
nvm use default

Switch versions

nvm use 18
nvm use 20.20.0

Per-project Node version. Inside a project directory:

cd mi_proyecto
echo "20.20.0" > .nvmrc
nvm use
npm install