published: 20th of August 2021
In this post I will show you how to install Node JS and the Yarn package manager on Ubuntu 2004 server.
I am installing Node from the node source's distribution.
Run the Node JS setup script from the Node Source repository.
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
Install Node JS.
sudo apt install -y nodejs
Verify the version of Node that is installed.
node --version
# output
v16.7.0
Verify the version of NPM that is installed.
npm --version
# output
7.20.3
sudo npm install --global yarn
Confirm the version of Yarn that is installed.
yarn --version
# output
1.22.11
In this post, we installed Node JS and the Yarn package manager.