DEV Community

Cover image for How to install NodeJS
schBenedikt for Technology Schächner

Posted on • Originally published at technik.xn--schchner-2za.de

How to install NodeJS

Today we will show you how to install Node.js in Ubuntu.

If you like our article, we would be very happy about a Like and a comment!


You think it's easy to do

sudo apt install nodejs
That's true, but with the command

node -v
is the output

v10.19.0
But we need a newer version.

This works as follows:

First we download the script: (version number is desired version number)

curl -sL https://deb.nodesource.com/setup_versionnumber.x -o /tmp/nodesource_setup.sh
Then we run it with the following command:

sudo bash /tmp/nodesource_setup.sh
Now we can just use nodejs

sudo apt-get install -y nodejs
to install.

If you now again

node -v
executes, the output should be:

version number....
You need Node.js e.g. for the next article:

Face recognition in NextCloud

Top comments (2)

Collapse
 
valeryxs profile image
Valeryxs

I just recently started learning NodeJS

Collapse
 
schbenedikt profile image
schBenedikt

@valeryxs
That's great!
Then hopefully this article will help you!