Focus on cloud service provider activities
Notes on website operation and maintenance

Record the process of deploying and installing Yarn on the Ubuntu server

Yarn is a package manager for managing JavaScript dependencies, similar to npm. It was developed by Facebook and aims to solve some problems of npm, such as installation speed and reliability. Compared with npm, Yarn provides faster and more reliable dependency installation, as well as offline mode, lock file, network performance optimization and other functions. Yarn also allows you to use Workspaces to manage multiple packages, which is particularly useful for large projects. Yarn supports all npm packages and can work seamlessly with the npm library. If you are accustomed to using npm, you will soon be able to get started with Yarn.

You can install Yarn on Ubuntu as follows:

First, update the system package list:

 sudo apt-get update

Install Node.js and npm (if not already installed):

 sudo apt-get install nodejs npm

Add Yarn repository key:

 curl -sS  https://dl.yarnpkg.com/debian/pubkey.gpg  | sudo apt-key add -

To add a Yarn repository:

 echo "deb  https://dl.yarnpkg.com/debian/  stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

Update the system package list:

 sudo apt-get update

Install Yarn:

 sudo apt-get install yarn

After the installation is completed, you can verify whether Yarn is successfully installed by running the following command:

 yarn --version

This command should output the installed Yarn version number.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » Record the process of deploying and installing Yarn on the Ubuntu server


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge