To have access to Yarn’s executables globally, you will need to set up the PATH environment variable in your terminal. If Yarn is not found in your PATH, follow these steps to add it and allow it to be run from anywhere. This will point yarn to whatever version of node you decide to use. A workaround for this is to add an alias in your.
Note: Due to the use of nodejs instead of node name in some distros, yarn might complain about node not being installed. Sudo apt update & sudo apt install -no-install-recommends yarn