Categories
JavaScript Answers

How to fix Yarn global command not working with JavaScript?

Spread the love

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.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *