iOS main.jsbundle does not exists – Bundle React Native code and images
See original GitHub issueHello!
I have updated an app from react-native@0.55.4 to react-native@0.59.9 and I’m having problems with the iOS build step Bundle React Native code and images. The problem is that when the build gets on this step on the CI machine, fails automatically throwing the following error:
'error: File /Users/travis/Library/Developer/Xcode/DerivedData/app-arslyffdnfsjkgdxahmrdswzporu/Build/Intermediates.noindex/ArchiveIntermediates/app/BuildProductsPath/Release-iphoneos/appName.app/main.jsbundle does not exist. This must be a bug with React Native, please report it here: https://github.com/facebook/react-native/issues'
What bothers me is the thing that I can make a bundle on the CI machine using the react-native bundle command without any problems or issues So I can safely assume that there’s no problem with the bundle creation.
From what I’ve read at #18472, I tried the proposed solutions such as ensuring that the version of node it’s specified by nvm as default, tried to use another version of Xcode, tried to use a newer version of Node. Nothing fixed the problem. Also I’ve tried to debug the issue and seems that this command it’s not being executed. The thing is that this script itself doesn’t give any output of what happened on success or fail.
This is the error log:
React Native Environment
I’m running the builds on a Travis CI machine and before the bump to 0.59.9 this never happened.
info
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: (2) x64 Intel(R) Xeon(R) CPU E5-2697 v2 @ 2.70GHz
Memory: 1.94 GB / 4.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
Yarn: 1.16.0 - ~/.yarn/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
IDEs:
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.9 => 0.59.9
Steps To Reproduce
- Run the following command:
xcodebuild -scheme projectName -project ./ios/projectName.xcodeproj -configuration Release -destination 'generic/platform=iOS' -archivePath /Users/travis/Library/Developer/Xcode/Archives/2019-07-06/AppName\ 2019-07-06\ 07.16.44.xcarchive -UseModernBuildSystem=NO archive | tee /Users/travis/Library/Logs/gym/AppName-projectName.log | xcpretty
Describe what you expected to happen:
I expect that the main.jsbundle file is created successfully through the step of Bundle React Native code and images as it does if I do it manually using the react-native bundle command.
Thanks 🙏
Issue Analytics
- State:
- Created 4 years ago
- Reactions:17
- Comments:34 (7 by maintainers)
Top Related StackOverflow Question
After debugging out the issue, I found the problem, leaving it here just in case could help anyone:
On Xcode at the
Bundle React Native code and imagesBuild Phase I’ve set up theNODE_BINARYto the result ofwhich node.Then the CI finds always the correct binary regardless the node install method.
Upgraded react native version to 0.63.0 and build failed. Tried all solutions here but no luck yet. 😭