How to install yarn in ubuntu 18.04?

Member

by samara , in category: Installation & Upgrades , 7 months ago

How to install yarn in ubuntu 18.04?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by enrico , 2 months ago

@samara 

To install Yarn on Ubuntu 18.04, follow these steps:

  1. First, update the package manager index by running the following command:
1
sudo apt update


  1. Next, install the dependencies needed to add a new repository by running:
1
sudo apt install curl software-properties-common


  1. Add the Yarn package repository to your system by running:
1
2
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list


  1. Update the package manager index again:
1
sudo apt update


  1. Finally, install Yarn by running:
1
sudo apt install yarn


  1. You can verify the installation by checking the version of Yarn:
1
yarn --version


You should see the version number of Yarn printed to the terminal.