admin管理员组

文章数量:1391974

I have no issues running my Expo React Native app on any emulator (both iOS and Android). However, I'm trying to run the build on my personal iPhone 16, and I'm encountering an issue.

Here’s the sequence of steps I follow:

  • rm -rf node_modules yarn.lock
  • yarn
  • npx expo install
  • yarn global add expo-cli
  • yarn global add eas-cli
  • npx expo-doctor
  • npx expo prebuild --clean
  • cd ios
  • pod install
  • yarn ios # (to run it on the emulator) (successful)

Node version: (20.14.0 or LTS 22.14.0)

After that, I open the xcodeproj file inside the ios folder of my project using Xcode and attempt to run the build on my connected iPhone.

However, I receive the following error: ExpoModulesProvider -> no such module "ExpoModulesCore"

Since ExpoModulesCore is an internal (peer) dependency, and the execution fails immediately, I suspect there is something wrong specifically with Xcode. The node_modules folder and Podfile both contain the module, so it should be available.

What I have tried so far:

  • Cloning the react native project again.
  • Completely clearing Xcode cache.
  • Uninstalling and reinstalling Xcode.
  • Updating Expo, Yarn, Ruby, and dev tools.

I'm trying everything, but nothing seems to work.

Possible cause: It seems that Xcode is not correctly linking dependencies/modules within the build. The error occurs at the first import, so I don't think it’s a problem strictly related to that module itself. Just to be 100% clear, this is not happening in Android Studio.

I believe it’s an issue with CocoaPods. Could it be related to Swift?

Any help would be greatly appreciated!

本文标签: Xcode can39t find ExpoModulesCore when running Expo React Native app on physical iPhoneStack Overflow