centos,

Install Yarn on Centos 9 Stream

Dec 09, 2022 · 1 min read · Post a comment

Yarn can be very useful in terms of automating the process of updating, installing, configuring, or deleting NPM packages. Here I’m going to show you how to install yarn on CentOS 9 Stream.

Prerequisites

  • CentOS
  • sudo access

Install Yarn on CentOS 9

Step 1. Firstly, install the Node.js package if you don’t have it already.

sudo dnf install @nodejs

Step 2. Enable the yarn repo.

curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo

Step 3. Import the GPG key.

sudo rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg

Step 4. Install yarn.

sudo dnf install yarn

Step 5. Verify the installation.

yarn --version

Conclusion

Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.