EAS build: Build failing because CocoaPods could not find compatible versions for pod "ExpoModulesCore"

I am running an EAS build, and when I ran it on server, the build failed.

iOS build failed:
Compatible version 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 “cache.key” field (it can be set to any value) 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.

I ran it on local using “expo run:ios” and found that pod install was failing because of this error:

Command pod install failed.
└─ Cause: CocoaPods could not find compatible versions for pod “ExpoModulesCore”:
In Podfile:
EXImagePicker (from ../node_modules/expo-image-picker/ios) was resolved to 10.2.3, which depends on
ExpoModulesCore

ExpoModulesCore (from `../node_modules/expo-app-loading/node_modules/expo-modules-core/ios`)

Specs satisfying the ExpoModulesCore (from …/node_modules/expo-app-loading/node_modules/expo-modules-core/ios), ExpoModulesCore dependency were found, but they required a higher minimum deployment target.

What is to be done here?

Facing same issue.

Facing the same issue…
did you guys find any solution??

  1. what sdk version are you using?
  2. run yarn why expo-modules-core or the equivalent for npm. it’s likely that you have multiple versions of the library. you should make sure everything is aligned on one version, you can use yarn resolutions for this. we’ll have a nicer solution to ensure there’s better alignment in our next sdk release
1 Like

After resolving my expo-modules-core package and expo-splash-screen versions using yarn resolutions, I finally can get my pod installation to complete. However, I am getting this error once I yarn ios:

This package itself specifies a `main` module field that could not be resolved.

Edit: I solved it by adding “.cjs” extension to metro.config.js