How to install expo-cli using yarn

My first time using react-native, I had trouble installing expo-cli. When I tried to download it using npm, I got tons of errors and the advice I got on the internet, about re-installing node, clearing the cache and trying to install expo-cli, didn’t help.
So I decided to use yarn package manager and I wanted to share with you how I did it.
Please note that I am using cmder console for windows 10.
Step 1:
Install yarn
Step 2:
Install expo-cli using yarn :
If you get an error ‘expo command not found’, it means that the console can’t find the directory where the downloaded package was saved.
So let’s run the following code to fetch the location of the installed package in the computer
If, however, you get an error: could not find files for the given pattern(s), then you can manually search for it. The file is automatically saved in the User\[yourusername]\AppData\Local\ Yarn directory. Just visit the directory and locate it.
The console has a list of directories where it searches for executable files. Let’s list the directories and confirm if we can see our directory where the expo-cli is stored.
You will notice that your file location is not listed in the above list and that’s why we are getting the error: ‘expo not found’.
Therefore, we add it using the following command:
Now it should work
Happy coding!