How to Install Yarn on Ubuntu 18.04

Yarn is a JavaScript package manager compatible with npm that helps you automate the process of installing, updating, configuring, and removing npm packages.

It was created to solve a set of problems with the npm such as speeding up the packages installation process by parallelizing operations and reducing errors related to network connectivity.

OPTIONAL. Windows 10 Users

To install ubunu 18.04 on Windows 10 WSL, follow instructions below:

How To Install WSL on Windows 10

STEP 1. Enable yarn repository

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

STEP 2. Install

sudo apt update

#If you don't have node installed
sudo apt install yarn 

#If you have node installed
sudo apt install --no-install-recommends yarn

Step 3. Verify

yarn --version

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *