Build fails due to header files missing when using -fcxx-modules flag (AppDelegate.mm)
See original GitHub issueDescription
I can’t build the iOS project, always get the error <projectpath>/ios/Pods/Headers/Public/Yoga/yoga/YGNode.h:14:10: ‘BitUtils.h’ file not found. I tried cleaning up everything, reinstalling pods with repo update etc. etc., didn’t work…
Version
0.68.1
Output of npx react-native info
info Fetching system and libraries information… System: OS: macOS 12.3.1 CPU: (8) arm64 Apple M1 Memory: 146.02 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.13.0 - ~/Library/Caches/fnm_multishells/10309_1650316313370/bin/node Yarn: 1.22.15 - ~/Library/Caches/fnm_multishells/10309_1650316313370/bin/yarn npm: 8.7.0 - ~/Library/Caches/fnm_multishells/10309_1650316313370/bin/npm Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Not Found IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8193401 Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild Languages: Java: 11.0.14.1 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.1 => 0.68.1 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
I was currently upgrading from 0.66.3 to 0.68.1 and did all the steps in the upgrade helper to do so. Afterwards the build is not working.
Snack, code example, screenshot, or link to a repository
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:29 (11 by maintainers)
Top GitHub Comments
I managed to temporarily fix this by copying the files (which are symbolic links anyway) from
ios/Pods/Headers/Private/Yoga/yoga
toios/Pods/Headers/Public/Yoga/yoga
, started withBitUtils.h
then ended up dragging a few more until it built successfully.For me this started happening (maybe, still have to confirm but 99% sure) after I installed
expo
.Aha! It’s indeed there @cipolleschi 😄 tks. This page should be marketed more because I was not even aware it existed. I guess most of us are using the RNUpgradeHelper and reading what are the warnings there that we should be aware of before migrating to newer versions