Install Yarn in Ubuntu

Install Yarn in Ubuntu

I tried running yarn install command. But got the following error.

yarn install: ERROR: [Errno 2] No such file or directory: ‘install’

Here is the perfect way to install yarn in Ubuntu

Open the terminal and run the following command one by one.

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
sudo apt-get update 
sudo apt-get install yarn

Check Yarn Installation by using the following command.

ninja@softinttech:~$ yarn --version
1.22.5