eas-cli: main.jsbundle does not exist. This must be a bug with
This happens only when building the app with EAS namely during the fast lane step.
I’ve seen it in other react native related issues and they suggested to edit some files in Xcode, but I would like to keep the project expo managed, so I’m not sure how to fix it.
Here’s part of the build log, I think is most relevant:
[RUN_FASTLANE] › Linking Luffarelli » Luffarelli
[RUN_FASTLANE] ⚠️ ld: duplicate method '+moduleName' in
┌─[category]: ExpoBridgeModule-51af6d930ad374d100647ad3841ef291.o ExpoModulesCore/libExpoModulesCore.a
└─[class]: ExpoBridgeModule-a5e73f1bbab418e7b2a8cab5f33b1042.o ExpoModulesCore/libExpoModulesCore.a
[RUN_FASTLANE] ⚠️ ld: method '+UIStatusBarAnimation:' in category from /Users/daniele/Library/Developer/Xcode/DerivedData/Luffarelli-caqrovrlgcytbshiaqxicjigkuut/Build/Intermediates.noindex/ArchiveIntermediates/Luffarelli/BuildProductsPath/Release-iphoneos/React-CoreModules/libReact-CoreModules.a(RCTStatusBarManager.o) conflicts with same method from another category
[RUN_FASTLANE] › Generating debug Luffarelli » Luffarelli.app.dSYM
[RUN_FASTLANE] › Executing Luffarelli » Bundle React Native code and images
[RUN_FASTLANE] the transform cache was reset.
[RUN_FASTLANE]
❌ error: File /Users/daniele/Library/Developer/Xcode/DerivedData/Luffarelli-caqrovrlgcytbshiaqxicjigkuut/Build/Intermediates.noindex/ArchiveIntermediates/Luffarelli/BuildProductsPath/Release-iphoneos/Luffarelli.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
[RUN_FASTLANE] Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')
[RUN_FASTLANE] ▸ ** ARCHIVE FAILED **
[RUN_FASTLANE] ▸ The following build commands failed:
[RUN_FASTLANE] ▸ PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/daniele/Library/Developer/Xcode/DerivedData/Luffarelli-caqrovrlgcytbshiaqxicjigkuut/Build/Intermediates.noindex/ArchiveIntermediates/Luffarelli/IntermediateBuildFilesPath/Luffarelli.build/Release-iphoneos/Luffarelli.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'Luffarelli' from project 'Luffarelli')
[RUN_FASTLANE] ▸ (1 failure)
[RUN_FASTLANE] ** ARCHIVE FAILED **
[RUN_FASTLANE]
[RUN_FASTLANE]
[RUN_FASTLANE] The following build commands failed:
[RUN_FASTLANE] PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/daniele/Library/Developer/Xcode/DerivedData/Luffarelli-caqrovrlgcytbshiaqxicjigkuut/Build/Intermediates.noindex/ArchiveIntermediates/Luffarelli/IntermediateBuildFilesPath/Luffarelli.build/Release-iphoneos/Luffarelli.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'Luffarelli' from project 'Luffarelli')
[RUN_FASTLANE] (1 failure)
[RUN_FASTLANE] Exit status: 65
[RUN_FASTLANE]
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE] | Build environment |
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE] | xcode_path | /Applications/Xcode.app |
[RUN_FASTLANE] | gym_version | 2.205.1 |
[RUN_FASTLANE] | sdk | iPhoneOS16.0.sdk |
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE] Looks like fastlane ran into a build/archive error with your project
[RUN_FASTLANE] It's hard to tell what's causing the error, so we wrote some guides on how
[RUN_FASTLANE] to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
[RUN_FASTLANE] Before submitting an issue on GitHub, please follow the guide above and make
[RUN_FASTLANE] sure your project is set up correctly.
[RUN_FASTLANE] fastlane uses `xcodebuild` commands to generate your binary, you can see the
[RUN_FASTLANE] the full commands printed out in yellow in the above log.
[RUN_FASTLANE] Make sure to inspect the output above, as usually you'll find more error information there
[RUN_FASTLANE] [!] Error building the application - see the log above
[RUN_FASTLANE] Error: Fastlane build failed with unknown error. See logs for the "Run fastlane" and "Xcode Logs" phases for more information.
Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.
[CLEAN_UP_CREDENTIALS] Destroying keychain - /var/folders/yv/415_mqjn13j0c7np7mskxf9r0000gn/T/turtle-v2-2439e84c-47ae-499e-beea-2d3089dc01f3.keychain
[CLEAN_UP_CREDENTIALS] Removing provisioning profile
Build failed
Fastlane build failed with unknown error. See logs for the "Run fastlane" and "Xcode Logs" phases for more information.
Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.
Error: npx exited with non-zero code: 1
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 17 (2 by maintainers)
Same error after upgrade here.
I was seeing this problem as well but seem to have found a solution. I commented out aws-exports.js in my .gitignore. I am using AWS amplify on my project. This file was not being included when uploaded to eas since it was in .gitignore. You can review your xcode log for more details - this is where I saw the error “error Unable to resolve module ./src/aws-exports from /Users/expo/workingdir/build/App.js”. I did also downgrade the SDK to 46 but I don’t think that was the solution.
Same @tannerabread
I’m also seeing this problem and am using various @fortawesome SVG icons in my project. I’m using them in quite a lot of places though so I haven’t removed them to be able to verify this is the issue. May I ask where you saw the logs which mentioned an SVG related error? When I start my app using either expo go or a development build (both on the simulator) I don’t see any errors.
I solved my problem by looking at the logs when the app starts on an iPhone. There I saw it tried to import something with errors (SVG related). So I removed
@fortawesome/free-regular-svg-icons, @fortawesome/free-solid-svg-iconsfrom my deps, and commented some stuff in the app that used these icons and now the EAS build works@dancamdev I’m not sure if it’s bug in react-native or expected behavior, either way not really EAS issue.
To fix that you just need to remove underscores from number literals. e.g. You probably have sth like
10_000, just change it to10000https://github.com/facebook/react-native/issues/31551 https://github.com/facebook/metro/issues/645