Add the appropriate “Tag” based on what Expo library you have a question on.
Issue
Installing expo-updates and expo-app-loading with Yarn 2 in a bare workflow project breaks the iOS build. I believe this to be another issue related to which versions of which libraries get installed directly under node_modules. This is the other issue of this nature that I have raised
The build breaks with
› Compiling expo-updates Pods/EXUpdates » ExpoUpdatesReactDelegateHandler.swift
❌ (node_modules/expo-updates/ios/EXUpdates/ReactDelegateHandler/ExpoUpdatesReactDelegateHandler.swift:39:24)
37 | }()
38 |
> 39 | public override func createBridge(reactDelegate: ExpoReactDelegate, bridgeDelegate: RCTBridgeDelegate, launchOptions: [AnyHashable : Any]?) -> RCTBridge? {
| ^ method does not override any method from its superclass
40 | if (!shouldEnableAutoSetup) {
41 | return nil
42 | }
❌ (node_modules/expo-updates/ios/EXUpdates/ReactDelegateHandler/ExpoUpdatesReactDelegateHandler.swift:59:24)
57 | }
58 |
> 59 | public override func createRootView(reactDelegate: ExpoReactDelegate, bridge: RCTBridge, moduleName: String, initialProperties: [AnyHashable : Any]?) -> RCTRootView? {
| ^ method does not override any method from its superclass
60 | if (!shouldEnableAutoSetup) {
61 | return nil
62 | }
❌ (node_modules/expo-updates/ios/EXUpdates/ReactDelegateHandler/ExpoUpdatesReactDelegateHandler.swift:5:14)
3 | import ExpoModulesCore
4 |
> 5 | public class ExpoUpdatesReactDelegateHandler: ExpoReactDelegateHandler, EXUpdatesAppControllerDelegate, RCTBridgeDelegate {
| ^ cannot inherit from class 'ExpoReactDelegateHandler' because it has overridable members that could not be loaded
6 | private weak var reactDelegate: ExpoReactDelegate?
7 | private var bridgeDelegate: RCTBridgeDelegate?
8 | private var launchOptions: [AnyHashable : Any]?
Steps to reproduce
expo init expo-test -t bare-minimum
cd expo-test
yarn set version berry # Migrate to Yarn 2
yarn install
expo install expo-app-loading expo-updates
npx pod-install
yarn ios # Broken
Cause
I believe having both expo-app-loading and expo-updates installed tips the scales and forces expo-modules-auotlinking 0.4.0 to be installed at the top level of node_modules instead of expo-modules-autolinking 0.5.1.
Before running expo install expo-app-loading expo-updates… node_modules/expo-modules-autolinking 0.5.1 is present (the version required by Expo) but after running the command it swaps to be 0.4.0 and 0.5.1 is moved to node_modules/expo/node_modules/.
Edit:
I have tried using resolutions in package.json to try and put 0.5.1 directly under node_modules and this doesn’t resolve the problem. No idea what the true cause is.
Yeah this one is a pain. Even my workarounds using resolutions in package.json to force expo-modules-autolinking 0.5.1 to live directly under node_modules don’t work this time. It feels like a race condition.
The build in Xcode throws exactly the same error… but there doesn’t seem to be any good reason why ExpoReactDelegateHandler can’t be inherited from.
hi there! we’ve published new expo-splash-screen to deal with the issue. please try again after updating the latest expo-splash-screen. from a new init project, we included the update already and i can confirm it work. thanks for reporting this issue to us with the super helpful root cause analysis. if you still encounter the problem, please let us know.