Home » React Native Expo » How to install or update the Expo CLI

How to install or update the Expo CLI

By Emily

While you are creating and building your Expo app you will need to make sure you keep Expo CLI updated, this post shows how to install, uninstall, or upgrade expo-CLI. If you are running your development build on an app you’ll also need to make sure you keep the Expo Go client updated too, links to which are included below. If you’re running your development build on an Android emulator it’s also worth keeping those updated.

Update the Expo CLI

When a new version of Expo has been released you’ll see a message something like this telling you you need to upgrade:

how to update or upgrade Expo CLI

So to start to upgrade, type:

npm install -g expo-cli

Once you’ve pressed return you’ll see a bunch of messages show up and it will whirr away for a good few minutes while it updates everything. Mine took a good 5 minutes and half way through it seemed to sit and do nothing – just leave it alone for a while, it is updating! Once it has finished updating you’ll see a message similar to the following, and you’ll see a new prompt.

update expo-cli complete

I’d recommend updating the Expo client at the same time either on the App Store – https://apps.apple.com/gb/app/expo-go/id982107779 or for Android on Google Play – https://play.google.com/store/apps/details?id=host.exp.exponent&hl=en_GB&gl=US.

Problems when upgrading the Expo CLI

People sometimes run into problems when upgrading the expo-cli and as per this blog post and others it seems the answer is often to uninstall and reinstall it, which worked for me.

Update existing Expo apps

If you’ve already built other Expo apps you’ll have to upgrade those too by running expo build:ios and expo build:Android.

How to uninstall expo-cli

To uninstall the Expo CLI if you use npm, type this in the cmd window:

npm -g uninstall expo-cli --save 

If you use yarn:

yarn global remove expo-cli

I’ve covered how to install, update, and uninstall Expo CLI – if you have trouble or need to know anything else please do email me, and I’ll update the post.

Summary

You’ve now learned how to update the expo cli, how to uninstall expo and have some information about a few common problems you may experience during the process. If you encounter any other issues that I can include in this post then let me know.

FAQ’s

How can I update the Expo CLI?

Use the command npm install -g expo-cli to update the CLI

How do I uninstall the Expo CLI?

Use the command npm -g uninstall expo-cli --save to uninstall the CLI


You may also be interested in: