Reputation: 266
I've just installed expo-cli with npm install -g expo-cli
, but if I try and run an expo command, I just get the error -bash: expo: command not found
. I've tried uninstalling and reinstalling expo-cli, and changing my .profile and .bash_profile to add the path to the global node_modules directory, but I just can't get expo commands working. Any idea why?
Upvotes: 0
Views: 1188
Reputation: 21
For any expo
command, try running:
$ npx expo <your command(s) here>
Using the command above solved the
-bash: expo: command not found
error for me.
($
denotes the terminal prompt)
I also ran npm install -g expo-cli
before running my command above.
Upvotes: 2
Reputation: 1
1st I enabled the finder to show hidden files by writing following commands:
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
Then I searched for the expo files under my user:
macintoch HD>Users>MyUserName>
I found the expo file under the following folder:
~/Users/MyUserName/.npm-globalHomebrew/bin
Then I added the folder in the Path by executing the following commands:
export PATH=$PATH:~/.npm-globalHomebrew/bin
I checked if it is added successfully by typing the following command:
echo $PATH
Run then the following commands to login to expo:
expo login
expo whoami
Upvotes: 0