Setting up Node
Like Docker, there is also an installation script for Node and it’s probably the easiest way to install it. Unfortunately also this script doesn’t work for Arch Linux.
Run the following commands to install node on Debian.
sudo apt-get install -y curl
curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh
bash nodesource_setup.sh
sudo apt-get install -y nodejs
Setting up Node on Arch Linux
Run the following command(s),
sudo pacman -S nodejs npm
Install Node Version Manager (optional)
Run the following command(s) to install nvm and the latest lts version of node.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
source ~/.bashrc
nvm install --lts
Note: The above commands should work for both Debian and Arch Linux.
Source(s):