Installing Expo CLI on Mac OS X
Ever wonder why you need the expo-cli?
Expo CLI is a command line app that is the main interface between a developer and Expo tools. You’ll use it for a variety of tasks, such as: Creating new projects. Developing your app: running the project server, viewing logs, opening your app in a simulator.
As you might want to ask, what is Expo?
In addition to React Native components, you’ll have access to the Expo SDK, a library that provides a wide variety of native APIs on iOS and Android. Expo can also manage your assets for you, take care of push notifications, and build your final native binary for submission to the app store.
Find out more about Expo here.
Let me walk you through my story.
I was about to bring an idea into reality using vue-native, in which I will be in need of the expo tools. As you can guess already, to make work better, I had to install the expo-cli. But guess what, I encountered as many errors as possible and I tried surfing the internet, but all provided solution I could lay my hands on were not working for me.
As the documentation says, use the following line of code install expo-cli.
With Joy in my heart, I copied the code and pasted it on my terminal, and boom, I got this error. Athough this wasn’t the initial error I got, but this is the image I could get my hands on.
Let’s forget about the way I reacted to the error at first, to move on.
The following were some of the measures I remembered doing inorder to solve the issue.
- I was using a slightly different version from the latest version of npm, I thought that was the issue, I upgraded npm and retried, still the same error.
- I downgraded back to the previous version, tried it again, but still same error.
- I tried disconnecting my system from the internet and reconnecting, tried again, still same error.
- Thought of stoping the whole project of a thing. Weird right?
- It got to a point, After several tries, I started noticing a change in the error. I had no idea if it was progress or not.
- And lots more..
I decided to switch to a diffuse mode of thinking, and after several hours, I turned back to being focused and consolidated all the particles of thought I had in the diffuse mode to come up with trying another way which was “using another package manager”.
i had brew installed, And so i did the following.
In conclusion, I decided to take you on a mini-tour because some people might not run into this type of error exactly, but I did and this was the way out for me.