After running npm install -g expo-cli
and successfully installing the packages globally, expo
is still not recognized as an internal or external command. Does anyone know how I might get around this issue using windows 10, or what to do in terms of something like a path variable.
To solve the error "'expo' is not recognized as an internal or external command, operable program or batch file", install the expo cli globally by running npm install --global expo-cli and make sure your PATH environment variable is set up correctly.
If you want to see how your app will run on your device, all you have to do is connect it, run npx expo run:ios —-device , select your connected device. Expo CLI will automatically sign the device for development, install the app, and launch into it.
Expo Go allows you to run your React Native app on a physical device without installing iOS and Android native SDKs.
Probably the only thing missing is to add the expo executable to your path.
For Windows 10, you can simply add the npm folder to your path environment variable.
Environment variables
.System variables
, add a new entry (entries are separated by semicolons) with this content (without /node_modules ):%USERPROFILE%\AppData\Roaming\npm
OR if you are using yarn C:\Users\{USER}\AppData\Local\Yarn\bin
(as @Qwerty mentioned above)
> expo
You will see something like this:
I may be too late to answer this, but for people looking for the same error this is what worked for me.
Install yarn
if you don't have it. I used the command choco install yarn
(you'll have to install Chocolatey). If you have scoop installed, scoop install yarn
also works.
Use yarn
to install expo
with yarn global add expo-cli
.
expo start
should work now. yarn start
and npm start
should also work.
Hope that helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With