Search code examples
iosreact-nativebuildexpococoapods

expo EAS build (iOS) fails in Pod installation step (SDK45 & 46)


I am trying to build iOS app (simulator) from expo managed project. The build fails At Pod installation step.

In Expo SDK 44 everything is okay. But when I upgrade to SDK 45 or even 46, I am facing the issue.

Here are some logs from expo server:

Run Expo Doctor

Running "expo doctor"
- Finding all copies of expo-modules-autolinking
- Finding all copies of @expo/config-plugins
[stderr] 
[02:48:23] Expected package @expo/config-plugins@^5.0.0
[stderr] 
[02:48:23] Found invalid:
[stderr] 
[02:48:23]   @expo/[email protected]
[stderr] 
[02:48:23]   (for more info, run: npm why @expo/config-plugins)
- Finding all copies of @expo/prebuild-config
- Finding all copies of @unimodules/core
- Finding all copies of @unimodules/react-native-adapter
- Finding all copies of react-native-unimodules
[stderr] 
[02:48:28] Some dependencies are incompatible with the installed expo package version:
[stderr] 
[02:48:28]  - react - expected version: 18.0.0 - actual version installed: 17.0.2
[stderr] 
[02:48:28]  - react-dom - expected version: 18.0.0 - actual version installed: 17.0.2
[stderr] 
[02:48:28]  - react-native - expected version: 0.69.4 - actual version installed: 0.68.2
[stderr] 
[02:48:28] Your project may not work correctly until you install the correct versions of the packages.
[stderr] 
To install the correct versions of these packages, please run: expo doctor --fix-dependencies,
[stderr] 
or install individual packages by running expo install [package-name ...]
[stderr] 
[02:48:31] Warning: Invalid version [email protected] for expo sdkVersion 46.0.0. Use [email protected]
Command "expo doctor" failed.
bash exited with non-zero code: 1

Install Pods

Installing pods
Using Expo modules
Auto-generating `.xcode.env.local` with $NODE_BINARY=/Users/expo/.nvm/versions/node/v16.13.2/bin/node
Auto-linking React Native modules for target `Classima`: RNDateTimePicker, RNGestureHandler, RNReanimated, RNSVG, RNScreens, lottie-react-native, react-native-maps, react-native-netinfo, react-native-safe-area-context, react-native-slider, react-native-webview, and stripe-react-native
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
[!] CocoaPods could not find compatible versions for pod "RCT-Folly":
  In snapshot (Podfile.lock):
    RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
  In Podfile:
    RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
It seems like you've changed the version of the dependency `RCT-Folly` and it differs from the version stored in `Pods/Local Podspecs`.
You should run `pod update RCT-Folly --no-repo-update` to apply changes made locally.
Error: Compatible versions of some pods could not be resolved.
You are seeing this error because either:
 - Versions in the Podfile.lock cached by EAS do not match required values for some of the libraries, it can be triggered when upgrading Expo SDK or any other library with native code. To fix that add the "cache.key" field (it can be set to any value) in the build profile in eas.json to invalidate the cache.
 - Some of your npm packages have native code that depend on different versions of the same pod. Please see logs for more info.

Fail Build

Build failed: Compatible versions of some pods could not be resolved.
You are seeing this error because either:
  - Versions in the Podfile.lock cached by EAS do not match required values for some of the libraries, it can be triggered when upgrading Expo SDK or any other library with native code. To fix that add the "cache.key" field (it can be set to any value) in the build profile in eas.json to invalidate the cache.
  - Some of your npm packages have native code that depend on different versions of the same pod. Please see logs for more info.

Solution

  • eas build -p ios --clear-cache