Check out example codes for "debian install npm". It will help you in understanding the concepts better.

Code Example 1

# Debian installing Node.JS and NPM package manager
sudo apt update
sudo apt install nodejs npm

Code Example 2

sudo apt install nodejs

Learn ReactJs, React Native from akashmittal.com