Install Node.js with npm on Debian 10 In this tutorial, we are going to learn how to install Node.js with npm on Debian 10
Table of Contents
Where npm stands for Node Package Manager which is the default package manager for Node.js. npm is the world’s largest software registry for Node.js packages with thousands of packages available.
In this tutorial we will install Node.js in following two ways:
First, Update Debian apt package manager index by running the following command.
sudo apt update
Install Node.js from Debian global repository by typing
sudo apt install node
Confirm the installation of Node.js by typing
Install npm by running following command
sudo apt install npm
Confirm the installation of npm by typing
NVM stands for Node Version Manager which is used to manage multiple Node.js versions. If you want to install or uninstall different versions of Node.js then NVM is there for you.
First, we will install NVM (Node Package Manager) on your system. So download the NVM installation script running the following command.
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
Check nvm version and confirm installation typing
Now install Node.js by using the following command.
nvm install node
Verify Node.js installation by typing
The output should be:
You can install multiple versions of Node.js. To do so type the following:
nvm install 8.14
nvm install --lts
nvm install 11.3
To list all the versions installed run following command.
You can change the current default version of Node.js by using the following command.
nvm use 8.14
To uninstall a Node.js version type following command
nvm uninstall 11.14
NodeSource company provides enterprise-grade node support also maintains the repository containing the latest version of Node.js.
To enable the NodeSource repository on your system run following command.
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
NOTE: The latest LTS version of Node.js is 10.x if you want to install 8.x version then just replace
Now install Node.js and npm package typing.
sudo apt install nodejs
Verify installation of Node.js and npm running following command
Now install some packages needed for development by running following command
sudo apt install gcc g++ make
Uninstall Node.js use following command
sudo apt remove nodejs npm
sudo apt autoremove
To uninstall node.js version using nvm type following command
nvm uninstall 10.14
You have successfully learned how to install Node.js with npm on Debian 10. If you have any queries don’t forget to comment below.
A thoroughly researched list of top NodeJS development companies with ratings & reviews to help hire the best Node.JS developers who provide development services and solutions across the world. List of Leading Node.js development Service Providers...
Node.js for Beginners - Learn Node.js from Scratch (Step by Step) - Learn the basics of Node.js. This Node.js tutorial will guide you step by step so that you will learn basics and theory of every part. Learn to use Node.js like a professional. You’ll learn: Basic Of Node, Modules, NPM In Node, Event, Email, Uploading File, Advance Of Node.
In this post, I will show you how to use Express.js, Node.js and MongoDB.js. We will be creating a very simple Node application, that will allow users to input data that they want to store in a MongoDB database. It will also show all items that have been entered into the database.