There are few methods to install Node.js on Debian 11.
- Using PPA
- Using NVM
- From the Debian official packages
I’m going to pick up the last one because it’s a quick and easy to install method, but essentially it’s a stable and long term option.
Prerequisites
- Debian 11
- sudo privileges
Install Node.js on Debian 11 using Debian official packages
Step 1. As a routine update the packages.
sudo apt update
Step 2. Once is done you can install Node.js and NPM together.
sudo apt install nodejs npm
Step 3. Make sure that the installation is done.
node -v
Output:
v12.22.5
Step 4. Check the NPM version as well.
npm -v
Output:
7.5.2
Conclusion
The installation is pretty quick and simple, so I don’t expect you to face issues, but if there is something you can raise it in the comments below. Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.