Follow through this guide to learn how to install Yarn on Rocky Linux 8. Yarn is an acronym for Yet Another Resource Navigator, and is a fast, secure and reliable JavaScript package manager that is compatible with npm registry and can be used with npm.
Install Yarn on Rocky Linux 8
There are two ways in which you can install Yarn on Rocky Linux 8.
Install Yarn on Rocky Linux 8 via npm
Install Nodejs on Rocky Linux.
dnf install nodejs
Nodejs provided npm package which you can use to install Yarn on Rocky Linux 8.
To install Yarn on Rocky Linux 8 using the npm package, run the command below;
npm install -g yarn
Confirm the installed version;
yarn -v
Sample output;
1.22.11
You can check the current versions of yarn on the releases page.
Install Yarn from Yarn Repo via YUM/DNF package manager
You can also install Yarn from their official repositories.
Install Yarn repository;
dnf config-manager --add-repo=https://dl.yarnpkg.com/rpm/yarn.repo
Install repository signing gpg keys;
rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg
Install Yarn on Rocky Linux 8;
dnf install yarn
Sample output;
Dependencies resolved.
============================================================================================================================================================================
Package Architecture Version Repository Size
============================================================================================================================================================================
Installing:
yarn noarch 1.22.5-1 yarn 1.2 M
Installing dependencies:
nodejs x86_64 1:10.24.0-1.module+el8.3.0+101+f84c7154 appstream 8.8 M
npm x86_64 1:6.14.11-1.10.24.0.1.module+el8.3.0+101+f84c7154 appstream 3.7 M
Installing weak dependencies:
nodejs-full-i18n x86_64 1:10.24.0-1.module+el8.3.0+101+f84c7154 appstream 7.3 M
Transaction Summary
============================================================================================================================================================================
Install 4 Packages
Total download size: 21 M
Installed size: 76 M
Is this ok [y/N]: y
Once installed, you should have yarn in your current.
Note that the version of Yarn installed via the Yarn repositories may not be up-to-date as compared to the version of Yarn installed via npm.
yarn -v
1.22.5
Using Yarn
You can now check Yarn documentation on how to get started with Yarn.
Other Tutorials
ELK: Send Alerts when no data is received on an index
Install and Setup Wazuh Server with ELK Stack on Ubuntu 20.04