react-native: No such module 'ExpoModulesCore'

Description

xcode give error No such module ‘ExpoModulesCore’ when I try build ios project.

Version

0.66.0

Output of react-native info

System: OS: macOS 12.1 CPU: (12) x64 Intel® Core™ i5-10600 CPU @ 3.30GHz Memory: 478.62 MB / 24.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 12.22.3 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.13 - /usr/local/bin/npm Watchman: Not Found Managers: CocoaPods: 1.11.0 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0 Android SDK: Not Found IDEs: Android Studio: Arctic Fox 2020.3.1 Patch 3 Arctic Fox 2020.3.1 Patch 3 Xcode: 13.1/13A1030d - /usr/bin/xcodebuild Languages: Java: 16.0.1 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: Not Found react-native: Not Found react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

build xcode project

Snack, code example, screenshot, or link to a repository

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (1 by maintainers)

Most upvoted comments

Try opening project.xcworkspace (and not project.xcodeproj) in Xcode and run via simulator.

You can do this on m1 mac

post_install do |installer|
// other steps
    installer.pods_project.build_configurations.each do |config|
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
    end
  end

Just set “yes” in Build Active Architecture Only for debug. Screen Shot 1400-11-27 at 11 00 31 PM

I was having the same issue, opening project.xcworkspace solved the issue for me. It’s working for real device also.

thanks @greenafrican

This also might happen if you open the xcodeproj file instead of the xcworkspace file after running expo prebuild 😃

Opening xCode with rosetta does it for me. image

Closing as a workaround was suggested. Moreover this looks like a Expo related issue, so it should be reported to: github.com/expo/expo/

For me, I accidentally had arm64 selected in Excluded Architectures. I removed the excluded architectures and had better results. image