Install Yarn live

[ Summary] I recently got an open source project on gayhub, so I am going to study the source code. Of course, the first step is to get the project up and running. Then I took a look at the technology stack and found that the package management tool uses yarn. I have heard of yarn before but I haven’t used it specifically. I only know that it is a package management program released by Facebook.

One, install

1. Download node.js, install with npm

npm install -g yarn 
View version: yarn --version

2. Install node.js, download the yarn installer:

Provide a .msi file, which will guide you to install Yarn on Windows during runtime

3. Yarn Taobao source installation, respectively copy and paste the following lines of code to the black window to run

yarn config set registry https://registry.npm.taobao.org -g 
yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g

Second, the moment of stepping on the pit

1. Error message when using yarn :

Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

2. Check the yarn version p>

D:\Seven\ways\hadoop-2.7.3>yarn version ok
Hadoop 2.7.3
Subversion https://git-wip-us.apache.org/repos/ asf/hadoop.git -r b3fe56402d908019d99af1f1f4fc65cb1d1436a2
Compiled by jdu on 2017-12-05T03:43Z
Compiled with protoc 2.5.0
From source with checksum 9ff4856d824e983fa510d3f843e3e3f19d runbr />This command was run using /D:/Seven/ways/hadoop-2.7.3/share/hadoop/common/hadoop-common-2.7.3.jar

3. Detect the yarn version yarn –version error

D:\Seven\ways\hadoop-2.7.3>yarn --version
Unrecognized option: --version
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

4. Installation dependency package error report

D: \Seven\ways\hadoop-2.7.3>yarn install
Error: Cannot find or load the main class install

5. Finally, there is no way to download the windows installation package again and provide an .msi file , It will guide you to install Yarn on Windows when it is running

Installation -> Test -> Report Error -> Reason for Detection -> No Environment Variables Configured -> Continue to Report Error, Reason for Detection -> Yes in the java installation environment The default yarn -> environment variable configuration is in front of it

6. Test

Microsoft Windows [Version 10.0.18362.239]
(c) 2019 Microsoft Corporation. all rights reserved.

C:\Users\Chirius>yarn --version
1.17.3

C:\Users\Chirius>

< p>

Leave a Comment

Your email address will not be published.