How to Install Yarn on CentOS Stream 10

To install Yarn on CentOS Stream 10, follow the steps below.

Using NPM

Step 1 : Before installing Yarn, ensure that you have NPM and Node.js installed. Run the following commands to verify their versions:

If you don't have them installed, first set up Node.js on your system.

Step 2 : Once NPM is installed, you can install Yarn globally with:

Step 3 : After installation, confirm Yarn is properly installed by checking its version:

Using DNF

Step 4 : Before proceeding, ensure your system is up to date:

Step 5 : Use the following command to add Yarn's official repository:

Step 6 : Confirm that the Yarn package is available in the added repository:

Step 7 : Install Yarn using the command:

Step 8 : Check the installed version of Yarn:

Congratulations! You have successfully installed Yarn on CentOS Stream 10.