Problem updating expo-cli

No problem. Glad it’s working for you!

Hey wodin! So the problem surfaced itself again. When I turn off my computer and reopen terminal, run expo start in the project directory I get -bash: expo: command not found. However, when I run the command export PATH=~/.npm-global/bin:$PATH and then expo start, I can get expo working.

The problem seems to be with some saving issue where expo cannot run in a different terminal session. What’s the best way to address this?

Hi

Yes, that’s what I meant when I said:

This is not actually a problem with Expo, but rather with where npm is installing it and/or how Bash is reading (or not) its startup files. (I know that doesn’t really help you, but technically it’s not something that Expo has any control over.)

One way around it would be to do this:

Edit /etc/paths and on the first line, above /usr/local/bin, put in just the path to the directory where the expo binary is located. e.g. /Users/<your-username>/.npm-global/bin

Then try closing and re-opening your terminal. Then echo $PATH should show the path to the npm bin directory before /usr/local/bin and Bash should be able to find the right expo command. If it doesn’t work, try a reboot.

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