Expo React-Native: EAS iOS build failing

Viewed 623

I’ve been having issues building the iOS app with eas and the managed workflow. The build fails during the fastlane build phase.

Strangely, the android version of the app builds successfully with eas, no problem.

The iOS version functions without issue in the simulator. Only the EAS build fails.

Fastlane error output

❌  error: File /Users/expo/Library/Developer/Xcode/DerivedData/Lehgu-dvthmbotvulohlhkecuuafkapqgu/Build/Intermediates.noindex/ArchiveIntermediates/Lehgu/BuildProductsPath/Release-iphoneos/Lehgu.app/main.jsbundle does not exist. This must be a bug with


❌ Metro encountered an error:
Unable to resolve module ./src/content/03_UmgangMitStress/02_WasHilftMirBeimUmgangMitStress/_07quizStressbewältigungUmgang.js from /Users/expo/workingdir/build/contentConfig.js:

None of these files exist:
  * src/content/03_UmgangMitStress/02_WasHilftMirBeimUmgangMitStress/_07quizStressbewältigungUmgang.js(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.svg|.native.svg|.svg)
  * src/content/03_UmgangMitStress/02_WasHilftMirBeimUmgangMitStress/_07quizStressbewältigungUmgang.js/index(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.svg|.native.svg|.svg)
  92 | import testbegegnen from "./src/content/03_UmgangMitStress/02_WasHilftMirBeimUmgangMitStress/testbegegnen.js"
  93 | import _06stressbewaeltigungLehrkraftberuf from "./src/content/03_UmgangMitStress/02_WasHilftMirBeimUmgangMitStress/_06stressbewaeltigungLehrkraftberuf.js"
> 94 | import { _07quizStressbewältigungUmgang } from "./src/content/03_UmgangMitStress/02_WasHilftMirBeimUmgangMitStress/_07quizStressbewältigungUmgang.js"
     |                                                 ^
  95 |
  96 | import _00wieGelingtEsMir from "./src/content/03_UmgangMitStress/03_WieGelingtEsMirZurRuheZuKommen/_00wieGelingtEsMir.js"
  97 | import _01achtsamkeitKurzErklaert from "./src/content/03_UmgangMitStress/03_WieGelingtEsMirZurRuheZuKommen/_01achtsamkeitKurzErklaert.js"
› Generating debug Lehgu » Lehgu.app.dSYM
⚠️  No such file or directory: /var/folders/6y/gy9gggt14379c_k39vwb50lc0000gn/C/org.llvm.clang.distiller/ModuleCache/OEL3R4BB85DS/FBSDKLoginKit-ROJFAQUX0UXS.pcm
⚠️  No such file or directory: /var/folders/6y/gy9gggt14379c_k39vwb50lc0000gn/C/org.llvm.clang.distiller/ModuleCache/OEL3R4BB85DS/UIKit-7ENARD7F75QG.pcm
⚠️  No such file or directory: /var/folders/6y/gy9gggt14379c_k39vwb50lc0000gn/C/org.llvm.clang.distiller/ModuleCache/OEL3R4BB85DS/Foundation-3ESNQVWWD07IL.pcm
⚠️  No such file or directory: /var/folders/6y/gy9gggt14379c_k39vwb50lc0000gn/C/org.llvm.clang.distiller/ModuleCache/OEL3R4BB85DS/SwiftShims-3E5PYOC7W29IN.pcm
▸ ** ARCHIVE FAILED **
▸ The following build commands failed:
▸   PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/expo/Library/Developer/Xcode/DerivedData/Lehgu-dvthmbotvulohlhkecuuafkapqgu/Build/Intermediates.noindex/ArchiveIntermediates/Lehgu/IntermediateBuildFilesPath/Lehgu.build/Release-iphoneos/Lehgu.build/Script-00DD1BFF1BD5951E006B06BC.sh
▸ (1 failure)
** ARCHIVE FAILED **

Based on the output of fastlane, it seems that the files don't exist at the specified path, but they definitely do. The app also runs just fine in the simulator and I can succesfully build using the old expo build tool (both iOS and Android) this seems to be something specific to fastlane or the EAS config that I don't understand.

Anyone have any helpful pointers?

1 Answers

I was expierencing the exact same problem. Build for iOS failed only with internal distribution, while Android build succeeded.

Finally I figured, that I had moved the App.(tsx|js) into a src folder but didn't complied to the requirements for doing so.

So a quick fix could be moving the App.(tsx/js) back to the root and remove the entryPoint from your app.(json|config.js|config.ts). Your package.json should include this:

"main": "node_modules/expo/AppEntry.js"

Otherwise the docs state for SDK 46 and lower you need to have a index.js in your project root and call registerRootComponent with you App component as parameter:

import { registerRootComponent } from 'expo';
import App from './src/App';

registerRootComponent(App);

With this approach you have to remove the main key in your package.json.

Related