How to Install Yarn on Debian 10

Install Yarn on Debian 10

In this article, we will have explained the necessary steps to install Yarn on Debian 10. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

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

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

Step 2. Install Yarn.

Now add the Yarn APT repository to your system:

Importing key add Yarn APT repository using the following command:

Run the command below to install it:

To verify that Yarn installed successfully, run the following commands which will print the Yarn version number:

Step 3. Using Yarn.

Create a new Project:

The init script will ask you several questions. You can either answer or press enter to use the default values:

To install all the dependencies given inside package.json file use following command:

Following is the basic syntax for adding the dependency:

Congratulation, you have learned how to install and configure Yarn on Debian 10 Buster. If you have any question, please leave a comment below.