Node.js has been developed as a JavaScript runtime with an asynchronous event approach with which it is possible to create reliable and stable applications. Node.js can be run cross-platform and is open source for JavaScript, among its main features we find:
Node.js features
- All APIs in the Node.js library are asynchronous
- It is built in the Google Chrome JavaScript V8 engine, this allows the Node.js library to be fast in code execution
- It has a single highly scalable thread
If your interest is to install Node.js and NPM in Ubuntu 21.04, getFastAnswer will explain the step by step for it..
To stay up to date, remember to subscribe to our YouTube channel! SUBSCRIBE
1. Install Node.js and NPM on Ubuntu 21.04 from the repositories
Step 1
We access the terminal in Ubuntu 21.04 and download the repositories with the following command:
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
Step 2
Once this process is finished we will see the following. In this case we will see this message as it is a test distribution, but this still installs Node.js on Ubuntu 21.04. In this case we will see this message as it is a test distribution, but this still installs Node.js on Ubuntu 21.04.
Step 3
Now we proceed to install Node.js with the command.
sudo apt install nodejs
Step 4
We check the Nodejs version:
node –version
Step 5
Now we are going to install NPM with the command:
sudo apt install npm
Step 6
We enter the letter S to confirm the download and installation:
Step 7
We check the NPM version:
npm –version
2 . Install Node.js and NPM on Ubuntu 21.04 from Snap
Step 1
Another option to install Node.js and NPM in Ubuntu 21.04 is with the Snap package manager, for this we are going to use the following command:
sudo snap install node --channel = 14 / stable –classic
Step 2
We check the versions:
node --version npm –version
With either of these two methods we can install node.js and NPM in Ubuntu 21.04.