Command PhaseScriptExecution failed with a nonzero exit code

I created my project using Expo and ejected into using ExpoKit. I ran pod install and npm install to make sure
I have everything. However, after I try to build with xcode, the following error showed up and failed my build:

Please install expo-cli command
Command PhaseScriptExecution failed with a nonzero exit code

I am pretty sure I have expo-cli installed. I am suspecting it is the path in the xcode that cannot find expo-cli. How should I fix this? I use npm to manage dependencies. Thank you so much!

2 Likes

Since people in the forum mentioned that this is fixed with ios release 2.8.3, I am currently on 2.8.3 but still experiencing this issue.

I tried to eliminate the problem from my code, so I built a new project and directly eject from that. So, I ran:

expo init
expo eject

The build still failed, with the exam same error message. I checked that the iOS release is at 2.8.3, and Expo SDK is at 30.0.1. I am using xcode 10 and build with Legacy Build.

Any suggestion or idea is mostly appreciated!!

Hi, I got the same error and made this workaround.
I’m using nvm, so npm i -g explo-cli actually installs to a specific path like:

"/Users/ramiro/.nvm/versions/node/v8.10.0/bin/expo"

I hacked the failing script as follows:

 set -eo pipefail


if [ -x "$(command -v expo)" ]; then
  expocommand="expo"
elif [ -x "$(command -v exp)" ]; then
  expocommand="exp"
else
  echo "Please install expo-cli command"
  echo "HACK"  
  expocommand="/Users/ramiro/.nvm/versions/node/v8.10.0/bin/expo"
#exit 1
fi

Hey, it not nice, but gets the work done.

Hope this helps

1 Like

Hi, sorry for this inconvenience :disappointed: We’re looking into this and will reach out to you once we find universal solution and fix it.
For now, I can confirm that what @ramirogm_palomonte wrote above is correct and should be enough to workaround this problem.

1 Like

Thank you so much! I really appreciate your hard work!

Thank you! I will try this.

Hi. I had several issues with #30, so I went back to #29 and now it’s :ok_hand::ok_hand:

We’ve just released a new version of ExpoKit (v2.8.4) which solves this issue. See my other comment to get more details on this.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.