Things are done differently on Apple, especially with the latest MacOs, Catalina. When I was going through these steps myself, it took some time as the steps were scattered across the internet. In this short all-in-one centralised tutorial, I am going to step you through getting the Expo Client working on MacOs Catalina.
Firstly, download your code editor of choice. For me, that was Visual Studio Code (which you can download here) as it is free to use, very intuitive and has the optionality of many add-ons to help speed up your development.
Secondly, download Node.js. There are two primary ways to do that on MacOs:
- Download Node.js from its home website.
- Install it using Homebrew from the command line. (Read this article for more information.)
With the security settings of Catalina, there tends to be problems installing applications globally. To avoid running into this issue, there are a number of steps you can follow to ensure a clean build (only if you downladed Node.js from its website):
If npm-global directory does not already exist, create it by typing into the command line:
mkdir ~/npm-global
Then set the target folder to this folder using the command:
npm config set prefix ‘~/npm-global’
Create a .zshrc file:
touch .zshrc
Open that file:
open -e .zshrc
Add the path to the profile:
npm config set prefix ‘~/npm-global’ export PATH=~/npm-glbal/bin:$PATH
Close this and restart the terminal.
For more details, check out this thread.
Once that step is completed, you will need to install the Expo Client. Again, Catalina’s security settings hamper global installations in the normal fashion. Instead type this command into the terminal:
sudo npm i -g –unsafe-perm expo-cli
Please keep in mind that the use of sudo requires a password. The unsafe-perm parameter bypasses the security settings on Catalina and allows you to install expo permanently globally.
And with that, you have installed the Expo client gobally on your mac!
Leave a Reply