Problems on installing expo-cli

I couldn’t get expo to install. I tried reinstall nodejs with different versions and it still gives me this error ‘test’ is not recognized as an internal or external command. Tried using both NPM and Yarn, was not able to install them. Does anyone know how to fix these problems?

Im running windows 10.

Logs:
PS C:\Users\MS1> yarn global add expo-cli
yarn global v1.19.2
[1/4] Resolving packages…
warning expo-cli > @expo/xdl > joi@14.0.4: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning expo-cli > babel-runtime > core-js@2.6.10: core-js@<3.0 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning expo-cli > @expo/xdl > joi > topo@3.0.3: This module has moved and is now available at @hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
warning expo-cli > @expo/xdl > joi > hoek@6.1.3: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
warning expo-cli > @expo/xdl > joi > topo > hoek@6.1.3: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
warning expo-cli > @expo/xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > joi@11.4.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning expo-cli > @expo/xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > joi > hoek@4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning expo-cli > @expo/xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > joi > topo@2.0.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning expo-cli > @expo/xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > joi > topo > hoek@4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning expo-cli > @expo/xdl > webpack-dev-server > chokidar > fsevents@1.2.9: One of your dependencies needs to upgrade to fsevents v2: 1) Proper nodejs v10+ support 2) No more fetching binaries from AWS, smaller package size
[2/4] Fetching packages…
info @expo/traveling-fastlane-darwin@1.11.0: The platform “win32” is incompatible with this module.
info “@expo/traveling-fastlane-darwin@1.11.0” is an optional dependency and failed compatibility check. Excluding it from installation.
warning multiyargs@1.0.0: The engine “yargs” appears to be invalid.
info @expo/ngrok-bin-darwin-ia32@2.2.8: The platform “win32” is incompatible with this module.
info “@expo/ngrok-bin-darwin-ia32@2.2.8” is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-darwin-ia32@2.2.8: The CPU architecture “x64” is incompatible with this module.
info @expo/ngrok-bin-freebsd-ia32@2.2.8: The platform “win32” is incompatible with this module.
info “@expo/ngrok-bin-freebsd-ia32@2.2.8” is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-freebsd-ia32@2.2.8: The CPU architecture “x64” is incompatible with this module.
info @expo/ngrok-bin-darwin-x64@2.2.8: The platform “win32” is incompatible with this module.
info “@expo/ngrok-bin-darwin-x64@2.2.8” is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-linux-arm@2.2.8: The platform “win32” is incompatible with this module.
info “@expo/ngrok-bin-linux-arm@2.2.8” is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-linux-arm@2.2.8: The CPU architecture “x64” is incompatible with this module.
info @expo/ngrok-bin-linux-arm64@2.2.8: The platform “win32” is incompatible with this module.
info “@expo/ngrok-bin-linux-arm64@2.2.8” is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-linux-arm64@2.2.8: The CPU architecture “x64” is incompatible with this module.
info @expo/ngrok-bin-freebsd-x64@2.2.8: The platform “win32” is incompatible with this module.
info “@expo/ngrok-bin-freebsd-x64@2.2.8” is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-sunos-x64@2.2.8: The platform “win32” is incompatible with this module.
info “@expo/ngrok-bin-sunos-x64@2.2.8” is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-win32-ia32@2.2.8-beta.1: The CPU architecture “x64” is incompatible with this module.
info “@expo/ngrok-bin-win32-ia32@2.2.8-beta.1” is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-linux-ia32@2.2.8: The platform “win32” is incompatible with this module.
info “@expo/ngrok-bin-linux-ia32@2.2.8” is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-linux-ia32@2.2.8: The CPU architecture “x64” is incompatible with this module.
info @expo/ngrok-bin-linux-x64@2.2.8: The platform “win32” is incompatible with this module.
info “@expo/ngrok-bin-linux-x64@2.2.8” is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.9: The platform “win32” is incompatible with this module.
info “fsevents@1.2.9” is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies…
[4/4] Building fresh packages…
[1/7] ⠂ dtrace-provider [2/7] ⠂ envsub [3/7] ⠂ sharp [4/7] ⠂ iltorb error C:\Users\MS1\AppData\Local\Yarn\Data\global\node_modules\envsub: Command failed.
Exit code: 1
Command: test -d .git && cp gitHookPrePush.sh .git/hooks/pre-push || true
Arguments:
Directory: C:\Users\MS1\AppData\Local\Yarn\Data\global\node_modules\envsub
Output:
‘test’ is not recognized as an internal or external command,

Fixed! I do the installations using Git Bash and it seems to work.

3 Likes

Very Weird, but indeed it worked! Thank yo uso much! Why did you think of doing that?

How did you got it fixed I have the same issue please help

@vuyo

If you’re on Windows, the easiest for the moment is to try downgrading to expo-cli version 3.5.0. I expect the problem will be fixed soon, but for the moment, later versions have problems on Windows unless I think you have python 2.x and Visual Studio installed.

npm install -g expo-cli@3.5.0

Thank you, I think it worked thou I dont know how to test it :grinning: yet
it also has a lot of warnings

The warnings during install are a known problem. It’s not great to ignore warnings generally, but they are expected.

Is this expected thou it looks too much please help

Yes, basically those are all optional packages that are not relevant to Windows.

e.g. fsevents: It is only supported on “darwin” (macOS) arch “any”, but you’re installing expo-cli on “win32” arch “ia32” (i.e. 32 bit Windows running on a 32 bit machine). So this message is just warning you that it is skipping that (optional) package. This is not a problem because it’s not needed on Windows.

Similarly, “@expo/ngrok-bin-linux-x64” is only relevant to 64-bit Linux.

etc.

The only thing I’m not 100% sure of is the “Exit status 1” part at the end. I can’t remember if that’s normal. But give it a try. I think it should work fine for you. Then when a version later than 3.9.1 is released you can try to upgrade to see if the original problem has been fixed. If it still doesn’t work you can post an update to the forums and then downgrade to 3.5.0 again.

EDIT: For anyone reading this in 2021 or later, please do not downgrade to expo-cli 3.5.0. It is ancient :slight_smile:

Okay, let me try then thank you so much

1 Like

I have lots of problem installing and using expo cli
I used Ubuntu version 20.04.3 LTS
nodejs version is 17.0.1
npm version 8.1.2
i use this sudo npm install --global expo-cli
I received lots of warning.
sb told me to downgrade nodejs
and new programs are as bellow:
my Ubuntu version is 20.04.3 LTS
my nodejs version is 16.13.0
npm version 8.1.0
still lots of warnning.
I also update and upgrade os but nothing changed.
Also I use that on windows 10. but nothing changed

You can see the whole issue in the github as I registered
https://github.com/expo/expo-cli/issues/3960

That’s right. Although it might work fine with nodejs 17.x, it’s not been fully tested on that version.

The other warnings in your screenshots can be ignored. I agree it is not a great experience, but unfortunately that is just the way it is. The deprecations and vulnerabilities mentioned will not impact the apps you create with Expo/React Native.

So give it a try. It should work fine. If you run into problems, create a new thread here with the details.

But I can not start expo
I use " expo init App1"
then " expo start"
the emulator page run but I faced to another error.
" error opening emulator. check metro logs for details"

OK, so from that it looks like expo-cli was installed and was able to run.

EDIT: Hold on. You said you were trying this on Linux and Windows? The iPhone Simulator is part of Xcode and only runs on macOS. See below if you’re trying this on a Mac. It would be best if you explained what you were trying to do.

If expo can’t start the simulator you probably have a problem with your Xcode installation. Are you able to open a simulator from Xcode?

First I tried it on ubuntu.
please see the errors in the screenshot
also pay attention to the version of nodejs and npm

then I start a project
“expo init App1”
and then
expo start
see the screenshot


then page in the last screenshot appears and I click on the android emulator. see the errors on the right side (I can not send more than 3 reply. I will send the screenshot after u send me an answer)

Those are warnings. Not errors. There is nothing in that screenshot that indicates a problem with expo-cli, but you should rather use node 16.x.

I am not sure if npm 8 could be a problem. It might be safer to stick with 7.x for now :man_shrugging:

By the way, you should generally not install npm modules using sudo.

So you got those messages about Xcode and the App Store just from running expo start?

Xcode is not compatible with Linux or Windows. So I don’t know why it would display stuff about Xcode when you’re running on Linux, any errors you get when trying to use Xcode or iOS simulators are not surprising.

The Android issues: First start Android Studio and run an emulator. Then try connecting to it from expo start. Otherwise use a physical Android phone connected via USB cable.

Everything you have shown me indicates that expo-cli was installed correctly.

this page appears and I click on the android emulator. see the errors on the right side


I want to use expo cli.
I do not have android studio.
After opening this page I scan the barcode with expo app on my android phone.
App stopped and do not work