expo: No such module 'ExpoModulesCore'
Summary
I decided to use https://docs.expo.dev/versions/latest/sdk/securestore/
I have installed expo modules with : npx install-expo-modules@latest
Everything went well.
When trying to run IOS app I get multiple errors, one of those errors:
/ios/Pods/Target Support Files/Pods-VanBruggen/ExpoModulesProvider.swift:8:8: No such module ‘ExpoModulesCore’
The app works well on android. What I checked:
- I tried to follow manual installation and check if all code has been applied properly and it did.
- Reinistalling node modules
- Removing Pods and Podfile.lock and reinstalling with pod install
- Restarting laptop.
I have noticed that my IOS deployment target had to be changed to 12 from 11.
Any ideas? Thank you.
Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!
bare
What platform(s) does this occur on?
iOS
SDK Version (managed workflow only)
No response
Environment
expo-env-info 1.0.3 environment info: System: OS: macOS 11.5.2 Shell: 5.8 - /bin/zsh Binaries: Node: 14.19.1 - ~/.nvm/versions/node/v14.19.1/bin/node Yarn: 1.22.15 - /usr/local/bin/yarn npm: 6.14.16 - ~/.nvm/versions/node/v14.19.1/bin/npm Watchman: 2021.09.27.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0 IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7678000 Xcode: 13.0/13A233 - /usr/bin/xcodebuild npmPackages: expo: ^45.0.0 => 45.0.4 react: 17.0.2 => 17.0.2 react-native: 0.68.1 => 0.68.1 Expo Workflow: bare
Reproducible demo
Not sure what I should provide. This issue appeared after installing expo modules based on https://docs.expo.dev/bare/installing-expo-modules/#usage
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 57 (6 by maintainers)
Hi there! It looks like your issue requires a minimal reproducible example, but it is invalid or absent. Please prepare such an example and share it in a new issue.
The best way to get attention to your issue is to provide a clean and easy way for a developer to reproduce the issue on their own machine. Please do not provide your entire project, or a project with more code than is necessary to reproduce the issue.
A side benefit of going through the process of narrowing down the minimal amount of code needed to reproduce the issue is that you may get lucky and discover that the bug is due to a mistake in your application code that you can quickly fix on your own.
Resources
Common concerns
“I’ve only been able to reproduce it in private, proprietary code”
You may not have spent enough time narrowing down the root cause of the issue. Try out the techniques discussed in this manual debugging guide to learn how to isolate the problem from the rest of your codebase.
“I didn’t have time to create one”
That’s understandable, it can take some time to prepare. We ask that you hold off on filing an issue until you are able to fully complete the required fields in the issue template.
“You can reproduce it by yourself by creating a project and following these steps”
This is useful knowledge, but it’s still valuable to have the resulting project that is produced from running the steps, where you have verified you can reproduce the issue.
I guess this issue isn’t resolved, I’m getting the same error though.
I landed on this because of a similar issue. Here is how I made it work.
.xcworkspacewith cocoapods)✅ Build Succeeded
Can confirm this issue is also seemingly present in the XCode 14.0 beta (M1 Pro)
I also am having this issue with an Expo SDK 44 project. I could compile with
expo run:iosfine on an Intel Mac, but I was getting the No such module ‘ExpoModulesCore’ error when trying to compile on an M1 MacBook.Tried all those steps you listed @byCedric, with no luck.
This workaround fixed it for me.
Oddly, I have a separate Expo SDK 44 project that compiles fine on the M1 MacBook without the workaround above 🤷🏻♂️
have the same issue on XCode 14 and m1 ;/
can the issue be reopened please …
Same issues
xcode 14.2 with m1 chip
-> none of these solution works for me
This block in my podfile from a stackoverflow post I can’t seem to find again seems to fix it for me on M1 Pro. (XCode 14.0). Your mileage my vary though
It needs to be added in the appropriate place in
post_installhook, like hereJust to leave my two cents on how I fixed my error, which seems different from @dev-sda1 but was similar to @fondue-tech when I first came across this issue. I started running into this problem when using build variants in bare.
I fixed it by going to “Build phases” and making sure the path to ExpoModulesProvider.swift was correct and unique (and actually verifying on my file system the file path was correct).
MacBook Air M2 2022 macOS: 13.0.1 (22A400) Xcode: 14.1 (14B47b) (Universal) Expo: 48.0.4
After creating the project,
expo install @rnmapbox/maps, i removedarm64fromExcluded Architecturesin Xcode andexpo run:iossucceeds! (@rnmapbox/mapsis what I put in for my use. There is no direct relationship.)If it helps anyone 😃
https://github.com/facebook/react-native/issues/32704#issuecomment-1174458011
A year ago, when upgrading to expo SDK 48, I had this exact issue and fixed it by applying this fix here
Now I’m upgrading from 48 to 50 and the issue return. Ended up removing that code from the podfile and it works. Hope this helps someone.
This issue,
no such module 'ExpoModulesCore', popped up for me with Xcode v14.3.1, Expo SDK 49.0.6, and the expo-dev-client, when trying to build for the iOS simulator with$ expo run:ios -d. [Running expo prebuild and opening the workspace in Xcode and remove Excluded Architecture (somehow arm64 was selected) as shown here resolved the issue for me.M1 Mac mini Xcode Version 14.3 (14E222b)
Works for me:
Product->Destination->Destination Architectures->Show Rosetta DestinationsThanks @come25136, removing the
arm64fromExcluded Architectureworked like a charm!I was able to fix for my use case, hope this would help anyone else in a similar situation:
I had three build schemes for different environments and build settings. This error was occurring in two of those schemes, but not in the third.
Since the two schemes shared similar settings with the third, I reset both of them using the third as template and applied the additional settings that existed on them. This fixed the error for my use case.
Some weird observations I have noticed trying to debug the issue:
Providing another update - managed to get a successful build after forcing Xcode to run under Rosetta on my M1 Machine. Note that when I did this, builds took significantly longer and certain features like the Simulator and running on Device seem a bit hit and miss (wouldn’t work first time, restarting xcode fixed it for now.
Goto your Applications folder, right click your Xcode install and select “Get Info”, then check “Open using Rosetta”. Close and open your .xcworkspace file as usual and builds should succeed normally.
Adding
expo-modules-autolinkingto project’s dependencies is not recommended, it may cause even more dependency conflicts. This andexpo-modules-coreare intended to be delivered only by theexpopackage. Could you runyarn why expo-modules-autolinkingto see what’s installing the old version?If you want to force using a specific version, I’d suggest using yarn resolutions instead.
@pohsiu I was using the package
expo-updates, so maybe you’re not using it. Also I realized yesterday that after installing other expo packages likeexpo-auth-session,expo-webbrowser,expo-random… the problem came back 😐 I’m gonna attempt to reproduce the issue in a small example app, honestly, I think this issue should be reopened.Had the same issue as well, but running through Xcode directly didn’t help. Removing EXCLUDED_ARCHS from
project.pbxprojdid though, then just built it through Xcode as well. Weird stuff. Also this thread helped : https://github.com/facebook/react-native/issues/32704did you guys find any solution for xcode 13.4.1
Unfortunately commenting this snippet out didn’t change anything for me (Also on XCode 14 Beta). However I can 99% of the time get it to build on my physical device by opening the .xcworkspace file in xcode