The is an advanced package management for Node.js applications. It is a fast, secure, and reliable alternative that any other package manager’s.

This tutorial contains three ways to Yarn on CentOS, , & system. Use one of the following ways:

1. Install Yarn using

Yarn package is available to install with NPM. You can simply run the following to install Yarn globally. Also, remove -g option to install for current only.

sudo npm install yarn -g

2. Install Yarn using Script

This is the most recommended way for the yarn installation. This downloads the yarn archive and extracts under the .yarn directory at home. The script also set the PATH environment variable.

curl -o- -L | bash

Using this installation yarn is available for current user only.

3. Install Yarn using

Yarn packages are also available with yum package manager. You can configure yarn official yum repository using the below command:

curl -sL -o /etc/yum.repos.d/yarn.repo

Now run the below command to install it.

sudo yum install yarn    ## CentOS and Redhat systems 
sudo dnf install yarn    ## Fedora systems
Print Friendly, PDF & Email



Bài viết liên quan