In this guide, we are going to learn about how to install Yarn on Debian 10 Buster. Yarn is a java script package manager that enables you to use and share your code with other developers quickly, securely, and reliably through a package which contains all the code being shared as well as a
package.json file which describes the package.
Install Yarn on Debian 10 Buster
Create Yarn Repository
Yarn is not available on default Debian 10 Buster repos. Thus, you need to create its repo for easy installation.
Before you can create the Yarn repo, you need install the Yarn repo GPG signing key.
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
Once the key is in place, run the command below to create the Yarn repo.
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
Run System Update
Now that the repos is installed, resynchronize your system packages to their latest versions.
Now that you have Yarn repos in place, run the command below to install it.
apt install yarn
Once the installation is done, you can run the command below to test Yarn installation.
That is it on installation Yarn on Debian 10 Buster.
Read more about Yarn and how to use on it documentation page.