6dev
January 30, 2021, 10:08am
1
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
wodin
January 30, 2021, 11:28am
2
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:
OK, so this shows that the new version of expo-cli is being installed to /Users/alexander/.npm-global/lib/node-modules/expo-cli.
Yes, that should do the trick.
6dev
January 30, 2021, 12:11pm
3
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!
system
Closed
February 19, 2021, 12:12pm
4
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.