DEV Community

Cover image for How to install Yarn
Philip Mac
Philip Mac

Posted on

How to install Yarn

The following steps can be used to install Yarn on your computer:

Using Windows:

Visit the Yarn website to learn more:
https://classic.yarnpkg.com/en/docs/install/#windows-stable
Get the download file now.
To begin installing the saved file, double click it.
To finish the program, adhere to the on-screen directions.

For Mac OS X:

Open the Terminal app (you can find it in the Utilities folder in your Applications folder).
Type

brew install yarn
Enter fullscreen mode Exit fullscreen mode

and hit enter.
Wait for the installation to finish.

For Linux (Ubuntu/Debian):

Open the Terminal app.
Type

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
Enter fullscreen mode Exit fullscreen mode

and hit enter.
Type

echo deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
Enter fullscreen mode Exit fullscreen mode

and hit enter.
Type

sudo apt update
Enter fullscreen mode Exit fullscreen mode

and hit enter.
Type

sudo apt install yarn
Enter fullscreen mode Exit fullscreen mode

and hit enter.
Wait for the installation to finish.
Once the installation is complete, you can verify that Yarn is installed on your system by typing

yarn --version
Enter fullscreen mode Exit fullscreen mode

in the Terminal app. If Yarn is installed correctly, you should see its version number displayed in the Terminal.

Top comments (0)