How to resolve the conflict between yarn of hadoop and yarn of node

when I use yarn install in the front-end project to prompt that java_home is not set,"-Dhadoop.log.dir" is not an internal or external command,
but I want to use yarn"s package to manage that solution

Jun.25,2022

assume that the installation directory for yarn is / usr/app/yarn-v1.13.0/.

execute:

ln -s /usr/app/yarn-v1.13.0/bin/yarn /usr/bin/yarn-js

use:

yarn-js -v

-additional note-
generally, all tools you install will have a / bin directory in their directory, which contains the executable files for the tool, such as yarn.

What does the

ln command do?
established a connection.
/ usr/bin/yarn-js is the executable of the system and is named yarn-js (the name is optional, but not conflicting).
ln-s / usr/app/yarn-v1.13.0/bin/yarn / usr/bin/yarn-js is to link yarn-js to / usr/app/yarn-v1.13.0/bin/yarn, the executable file for your installation yarn.
so that when you execute yarn-js, you are actually calling the yarn execution under the installation path.

aside: why configure the system path path? The answer is same as above.


the same problem, being followed, solved to answer, centos

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3642b-2b850.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3642b-2b850.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?