Expo command not found on Mac OS

I’m getting into react native and working on my first project but when installing the expo cli it seems to install successfully and gives me this message:

+ expo-cli@4.1.4
added 1840 packages from 816 contributors in 78.12s

But when actually attempting to use it with expo init rn-app it tells me that -bash: expo: command not found.

Thanks in advance

Hi. This means that the expo command is not in your PATH.

Did you install expo-cli with npm or yarn? Based on the output you posted I think npm.

You should be able to see where it was installed by running npm -g bin. On my machine this returns the following:

$ npm -g bin
/usr/local/bin

npm can be set up to install to your home directory instead in which case it might be something like:

/Users/youruser/.npm-global/bin

e.g. here’s another thread where someone else had the same problem:

I fixed it by using Volta and re-installing it. When checking now, -g bin does return /Users/me/.npm-global/bin actually, thanks though!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.