Windows installation yarn detailed tutorial

1. Introduction to yarn: yarn is a code package manager that allows us to share code with other developers from around the world. For more information, please visit the official website: https://yarnpkg.com/getting-started

2. Enter the official website of yarn, you can see that the official website has stated that starting from the new version (16.10), yarn comes with Node.js, so we can use yarn very conveniently by going directly to the official website of node.js to install node.js, no need to do it like before The old version needs to download the binary file of yarn to install and configure the environment, which is too troublesome.

insert image description here

3. Install node.js:

①Enter the node.js official website and download the node.js installation package: https://nodejs.org/en/download

insert image description here

②After the installation package is downloaded, find the location of the installation package, double-click to start the installation, after the installation interface appears, keep selecting Next until the installation is successful:

insert image description here

After the installation is complete, run the cmd command window as an administrator and execute the command: npm -v(or yarn -v), if no error is reported and the version information appears, the installation is successful:

insert image description here

insert image description here

④The last step is to enable the yarn tool, command: corepack enable, if no error is reported, the yarn tool can be used normally: (if an error is reported, make sure to run cmd as an administrator, otherwise there is no execution permission)

insert image description here

The usage of yarn is very simple, refer to the introduction on the official website:

insert image description here

insert image description here

Guess you like

Origin blog.csdn.net/qq_41320433/article/details/126654368