expo: [SDK 50] Pod install error: The Swift pod `ExpoModulesCore` depends upon `glog`, which does not define modules.
Minimal reproducible example
https://github.com/NervJS/taro-native-shell/tree/0.73.0
Summary
error info
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `ExpoModulesCore` depends upon `glog`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
Error: Process completed with exit code 1.
build action
https://github.com/NervJS/taro-native-shell/actions/runs/7194009870/job/19593603408
Environment
see actionlog
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Reactions: 13
- Comments: 40 (5 by maintainers)
Commits related to this issue
- patch podfile to fix github runner old version macos https://github.com/expo/expo/issues/25905 — committed to iron-fish/mobile-wallet by jowparks 3 months ago
- patch podfile to fix github runner old version macos https://github.com/expo/expo/issues/25905 — committed to iron-fish/mobile-wallet by jowparks 3 months ago
Hey @zhiqingchen, looks like you have the
expo-modules-core
package in the dependencies, which is not recommended. That package should only be a transitive dependency of theexpo
package. By specifying it as your direct dependency, you’re using a different version that is intended to be used with SDK 50. Can you try removing it from your package.json, run yarn again and reinstall pods?As I’m almost sure it’s the cause of the issue, I’m going to close it beforehand. Let me know if you’re still experiencing it even after going through my instructions.
I also have this issue +1 on expo sdk 50 (I don’t have expo-modules-core in my package.json)
removing node_modules, Pods, then reinstall everything seems works for me
Upgrading Xcode Command Line Tools to 15.1 fixed it for me. To do that, simply remove the old version and install the new one:
yeah, this issue seems to be from the react native side. setting
"DEFINES_MODULE" => "YES"
helps.@karlhorky yes
pod install error (tag v0.73.0-5) log: https://github.com/NervJS/taro-native-shell/actions/runs/7204271154/job/19625441734
pod install success(tag v0.73.0-6) log: https://github.com/NervJS/taro-native-shell/actions/runs/7206623790/job/19631822473
diff: https://github.com/NervJS/taro-native-shell/compare/v0.73.0-5...v0.73.0-6
only change to change the runner to runs-on: macos-13!
I’m not fully sure, but I suspect this logic in
glog.podspec
might be the issue 👇 https://github.com/facebook/react-native/blob/7c5e4262d4657b00e535ce8c6cbf8c69771a79a1/packages/react-native/third-party-podspecs/glog.podspec#L37-L49Can someone try to set
DEFINES_MODULE
config to"YES"
?I believe this has something to do with the Xcode version. After updating my project to the latest RN version(
0.73.2
) and updating Expo from48
to50
, my builds stopped working on CircleCI due to this error. By bumping the Xcode version from14.1
to15
, the builds began to work again. I think you actually may only need to go up to14.2
or14.3
as it also seemed to work on14.3
for me(didn’t try14.2
yet). Unfortunately for us, anything above14.1
causes issues with our E2E tests, but thats a tale for another repo’s Github issues.I’m getting the same error on a brand new react-native project. I’ve tried with react native 0.72.8 and 0.73.
I’m following this guide and when I run
npx install-expo-modules@latest
. I get the following errorFor reference, my
package.json
looks like soThis solved the issue for me.
In case anyone still has problems after this long thread. After about two days of error analysis (because it worked in a fresh project), I deintegrated the pods
pod deintegrate
, then deleted thePodfile.lock
and freshly integrate it (pod install
). And lo and behold! It now works as expected. If I had tried that directly 🤪Actually even “DEFINES_MODULE” => “YES” is giving the possibility to run pod install, but everything breaks when building. I think that expo comes with a lot of problems, for 3 years i decided to not use it, and letting it become more mature, but it seems that it’s not mature yet. for the first time after 3 years, i decided to use expo but i’m having a lot of headache. So my decision is to remove expo totally from my project, even this is too hard to do, so the solution is to init a new react-native-cli project and transfer all my code there.
Hi👋. Just to give some info related to this. This error doesn’t happen on my fresh RN 0.73.4 project. But then when i try to add Expo 50 modules to my app (by running
npx install-expo-modules@latest
) then this error happen.So, i think the error does come from the Expo SDK 50 side that *idk somehow affecting the
react-native
dep, and not from the RN side.How to reproduce:
npx install-expo-modules@latest
.occurs.
This is a workaround for Xcode <14.3, but I would recommend upgrading to 15 anyway. If for some reason you can’t, then yeah, best you can do is to use patch-package 😞
Trying to handle this glog-define-modules problem I ended up having xcode build error:
where I was using 12.4. Changing minimum ios deployment target finally fixed the problem for me. Hope this helps.
Xcode: 14.2 cocoapods: 1.15.2
manually modify the glob podspec to “DEFINES_MODULE” => “YES” only make the pod install success, but the build failed with errors
@tsapeta I found the “error” in my setup. As i said, a clean expo sdk 50 project was working. I had this pod ref in my Podfile:
pod 'react-native-google-cast/NoBluetoothArm', path: '../node_modules/react-native-google-cast/
After removing it, pods are getting installed again. So I would suggest to check if a clean expo project builds and then compare with the project that is not woring (libs and podfile config).
yeah, but it’s not only about ci/cd workflows. I can’t install pods locally to run the project on my macOS 12. and yes, not sure about the default, but the latest available XCode version on macOS 12 is 14.2
After reading all the comments, I’m guessing that the problem is with using the old version of Xcode. Looks like changing the workflow to run on
macos-13
solved the issue for some people.macos-13
uses Xcode 14.3.1 by default, whereasmacos-12
uses Xcode 14.2. Can someone confirm that?