I have an app running fine with React Native 0.57.7 on CircleCI on Xcode 9. But we need to bump up Xcode version to 10.1.0.
But when I switch it, Ci stops to work, even with enabling legacy system (-UseNewBuildSystem=NO
or -UseModernBuildSystem=0
being passed to Fastlane's build_ios_app
), I get "Myapp.app/main.jsbundle does not exist" error.
▸ + echo 'error: File /Users/distiller/project/ios/build/Build/Intermediates.noindex/ArchiveIntermediates/Myapp/BuildProductsPath/Release-iphoneos/Myapp.app/main.jsbundle does not exist. This must be a bug with'
▸ error: File /Users/distiller/project/ios/build/Build/Intermediates.noindex/ArchiveIntermediates/Myapp/BuildProductsPath/Release-iphoneos/Myapp.app/main.jsbundle does not exist. This must be a bug with
▸ + echo 'React Native, please report it here: https://github.com/facebook/react-native/issues'
▸ React Native, please report it here: https://github.com/facebook/react-native/issues
After some hours spent just to figure out what was going on with it, I found out the issue: the build is failing silently because the docker image for Xcode 10.1.0 on CircleCI is missing some dependencies needed to build the app by React Native.
The error was just saying “main.jsbundle does not exist”. It happens when xcode runs react-native-cli bundle
from react-native-xcode.sh
file. And it doesn't tell the root cause for the error: watchman
is missing in the docker image used by this Xcode version.
Why those images don’t have the same installed packages? I don’t know. I was only expecting the same installed packages between the images.
Adding brew install watchman
makes the CI pass again:
- run:
name: "Install React Native dependencies"
command: |
brew update
brew install watchman
I wish react-native-xcode.sh
could return the root error instead of just main.jsbundle does not exist
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