
Npm is a package and dependency manager for Node.js Once installed, verify the installed version of Node.js with the same commands as mentioned earlier in this is an event-driven and asynchronous Javascript runtime environment designed to build network applications and to run server-side Javascript applications allowing you to build applications using a single programming language. The Node.js package contains both the node and npm binaries. Now, install the Node.js version 16 with the following command: apt install nodejs If you want another version of Node.js (for example 14.x) just change the setup_16.x with setup_14.x.

We are going to download and run the Node.js installation script for version 16. NodeSource maintains an APT repository with multiple Node.js versions.įirst command will install ‘curl’ in our system: apt install curl -y The second method requires a bit more effort than the first, however in case you want to install a specific version of NodeJS and/or NPM, then this method is preferred. NodeJS and NPM installation from Debian Repositories – Check versions Method 2: Install Node.js and npm from NodeSource apt install nodejs npmĪs soon as both packages are installed, you can verify their version by executing the following commands: node -v npm -v Note that at the time of writing this tutorial (November 2022), Node.js version 12.22 is included by default on Debian’s repositories. This is the simplest and most reliable way. The following command will install both packages at once. Method 1: Install Node.js and NPM via Debian Repository We will demonstrate three different, easy ways. Now that our Debian 11 environment is fully up to date we can proceed to installing Node.js and NPM. You can do so by executing the following commands: apt update & apt upgrade -y

In this tutorial, we will demonstrate two easy ways to to install Node.js and NPM on a Debian 11 server. Along with React, Node.js is one of the most popular technologies in the world of front-end web development in 2022. Node.js is an open-source JavaScript library built on Chrome’s V8 engine and is primarily used for back-end API services and other server-side applications.
