'Command not found' when trying to install expo globally ubuntu [duplicate]
When I install expo it installs but it doesn't install. Here are the details about the issue.
I start off by typing:
yarn global add expo-cli@4
When it installs it says:
warning package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "expo-cli > xdl > @expo/dev-server > @expo/metro-config > [email protected]" has unmet peer dependency "@babel/core@*".
[4/4] Building fresh packages...
When I install expo using yarn I get:
Installed "[email protected]" with binaries:
- expo
- expo-cli
Done in 4.30s.
But when I type 'expo --version'
I get:
Command 'expo' not found, did you mean:
command 'exo' from snap exoscale-cli (v1.22.2)
command 'expn' from deb sendmail-base (8.15.2-18)
command 'expr' from deb coreutils (8.30-3ubuntu2)
See 'snap info <snapname>' for additional versions.
Solution 1:
Based on what you posted I'm assuming that the folder where yarn installs global node modules isn't in your path.
Try one of these:
- Try installing globally with npm (which is probably in your path)
npm i -g expo-cli
- Add yarn global folder to path:
echo PATH="$PATH:$(yarn global bin)" >> ~/.bash_profile
See this thread for more info: Yarn global command not working