Yard error: Could not create the Java Virtual Machine

Error message when yarn is used:

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

1. Check the yarn version (successful)

D:\me\angular\ng-app>yarn version
Hadoop 2.8.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 9ff4856d824e983fa510d3f843e3f19d
This command was run using /D:/dev/hadoop-2.8.3/share/hadoop/common/hadoop-common-2.8.3.jar

2. Check the yarn version

C:\Users\92809>yarn --version
Unrecognized option: --version
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.


3. Install dependency package (error reporting)

D:\me\angular\ng-app>yarn install
 Error: cannot find or load main class install


4. Finally, there is no way to download the windows installation package again Click to download the windows version of yarn installation package )

Install - > test - > error reporting - > detection reason - > no environment variable configured - > continue to report error, detection reason - > there is a default yarn in Java installation environment - > environment variable is configured in front of it

 

5. Test (successful)

C:\Users\92809>yarn --version
1.10.1

6. Connect Taobao image

(1) check the original registry

   D:\me\angular\ng-app>yarn config get registry
   https://registry.yarnpkg.com

(2) update to Taobao image

  D:\me\angular\ng-app>yarn config set registry http://registry.npm.taobao.org/
  yarn config v1.10.1
  success Set "registry" to "http://registry.npm.taobao.org/".
  Done in 0.04s.


7. Reinstall dependency package (successful)

D:\me\angular\ng-app>yarn install
yarn install v1.10.1
info No lockfile found.
[1/4] Resolving packages...
⠠ brace-expansion@^1.1.7

 

8. After more than a day's work, we finally solved the problem and gave ourselves a hand~~

 

 

Keywords: angular Hadoop Java git

Added by tibo on Tue, 17 Dec 2019 20:44:40 +0200