Sometimes, we want to fix Yarn global command not working with JavaScript
In this article, we’ll look at how to fix Yarn global command not working with JavaScript.
How to fix Yarn global command not working with JavaScript?
To fix Yarn global command not working with JavaScript, we add the return value of yarn global bin
to the PATH
environment variable.
To do this, we add
export PATH="$PATH:$(yarn global bin)"
to the ~/.bash_profile
file to load the Yarn’s global package folder into the PATH
environment variable.
Conclusion
To fix Yarn global command not working with JavaScript, we add the return value of yarn global bin
to the PATH
environment variable.