Well, good news and bad. The script calls ‘expo’ to make sure it is there. The bad news is that $PATH gets overwritten at some point. I use nvm, which means global node modules aren’t in the usual location
which expo
/Users/chris/.nvm/versions/node/v10.9.0/bin/expo
Here is what $PATH looks like during the iOS build process
After thinking about it for the weekend, I think that my best bet is to ditch NVM, since other scripts (including detach/signing/etc) could actually be failing silently for the same reason and I may be fighting this in other areas.
It would be great to get a response from Expo on this. Having the exact same issue. Being told to install expo-cli, even though it is installed and running ‘expo’ commands in the cli works normally.
Hi, sorry for this inconvenience 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 @cdelcol wrote above is correct and should be enough to workaround this problem.
Could you provide a code snippet? I’m still struggling to get this to work. I tried hard coding the PATH so that it leads to expo, and running it in command line works just fine, but still fails in Xcode.
We’ve just released a new version of ExpoKit (v2.8.4) which solves this issue. Unfortunately, you might need to do expo eject again or just apply below changes to your Xcode project configuration in “Build Phases” tab.
nvm deactivate // remove the nvm path
brew install node //install node at a global location
yarn global install expo-cli //now installs somewhere in a normal non-nvm path
That is it. When I re-open the terminal nvm is back, but the global node with expo-cli just sit there unused except for by xcode. I just have to remember to upgrade it in the extra location.
Yeah, it was also a good workaround for this issue but with the scripts I posted above (or in newly ejected app that already contains them) you don’t need to remember to upgrade global (non-nvm) expo-cli So I recommend this solution anyway
So, if I understand correctly, you can build it, but you can’t archive it? That’s weird Could you try to expand Xcode logs to get more details on what failed in the script?
Yeah I can build and run on simulator just fine. (Was able to even before running into this error when archiving.)
Xcode Error Output. Let me know if more would be helpful.
~/Documents/38thStreetStudios/Work/FirstClassDispatch/fc-chauffeur ~/Documents/38thStreetStudios/Work/FirstClassDispatch/fc-chauffeur/ios
[12:59:29] Error reading the manifest file. Make sure the path '/Users/stuartcasarotto/Documents/38thStreetStudios/Work/FirstClassDispatch/fc-chauffeur/ios/fc-chauffeur/Supporting/shell-app-manifest.json' is correct.
Error: Unexpected end of JSON input
[12:59:29] Set EXPO_DEBUG=true in your env to view the stack trace.
Command PhaseScriptExecution failed with a nonzero exit code
When I look into that file I see a blank file. Is it expected to be an empty file?
EDIT: Maybe my issue is separate from this. Happy to start a different thread.
EDIT 2: Can recreate this with the following steps:
expo init
yarn install
Add ios/bundleIdentifier and android/package to app.json
It looks like you need to run expo publish before you try to archive. It should generate shell app manifest which is then bundled in the app.
Let me know if that helped!
Was having the exact same issue. Unable to archive. I’ve been having problems with OTA updates not sending assets correctly, so wanted to avoid publishing, but as long as I have “enabled” set to false for OTA, it shouldn’t matter, right?