How-to's How to install Node.js
1. Update and upgrade the packages
  1. sudo apt update && sudo apt upgrade
2. Download and install Node.js from the NodeSource repository
# Download the Node.js setup script
  1. curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh
# Run the Node.js setup script with sudo
  1. sudo -E bash nodesource_setup.sh
# Install Node.js
  1. sudo apt-get install -y nodejs
3. Verify the Node.js installation
  1. node -v
v22.4.1