react-native: After upgrading to 0.71.11 Xcode build fails with 'butter/map.h' file not found
Description
After upgrading to 0.71.11 Xcode build fails with ‘butter/map.h’ file not found
Error is related to an include: #include <butter/map.h>. XCode can’t compile React-Codegen pod.
▸ Running script 'Copy generated compatibility header'
▸ Running script 'Copy generated compatibility header'
▸ Compiling FBReactNativeSpec-generated.mm
▸ Compiling FBReactNativeSpecJSI-generated.cpp
❌ ios/Pods/Headers/Public/ReactCommon/react/bridging/Object.h:13:10: 'butter/map.h' file not found
#include <butter/map.h>
This issue was also reported in reanimated repo - https://github.com/software-mansion/react-native-reanimated/issues/3823
It was suggested to delete Pods folder and /ios/build before each build, but it’s not an acceptable solution
React Native Version
0.71.11
Output of npx react-native info
System: OS: macOS 12.6.5 CPU: (10) arm64 Apple M1 Pro Memory: 256.14 MB / 32.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.20.1 - ~/.nvm/versions/node/v16.20.1/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v16.20.1/bin/yarn npm: 8.19.4 - ~/.nvm/versions/node/v16.20.1/bin/npm Watchman: 2023.07.10.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.12.1 SDKs: iOS SDK: Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1 Android SDK: API Levels: 25, 28, 29, 30, 31, 32, 33 Build Tools: 28.0.3, 29.0.2, 30.0.0, 30.0.2, 30.0.3, 31.0.0, 32.0.0, 33.0.0, 33.0.2 System Images: android-28 | Google ARM64-V8a Play ARM 64 v8a, android-29 | Google APIs ARM 64 v8a, android-30 | Google APIs ARM 64 v8a, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play ARM 64 v8a, android-30 | Google Play Intel x86 Atom, android-31 | Google APIs ARM 64 v8a, android-31 | Google APIs Intel x86_64 Atom, android-33 | Google APIs ARM 64 v8a, android-33 | Google Play ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2022.2 AI-222.4459.24.2221.10121639 Xcode: 14.2/14C18 - /usr/bin/xcodebuild Languages: Java: 11.0.19 - /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
- npx react-native init TestApp --version 0.71.11
- yarn add react-native-reanimated + babel config
- npm run ios or build via Xcode in ios/
Snack, code example, screenshot, or link to a repository
https://github.com/mgcrea/react-native-sandbox/tree/reanimated-bug
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 23 (6 by maintainers)
+1 with this issue with RN 0.72.3. Only works after run:
cd ios && rm -rf Pods && rm -rf Podfile.lock && rm -rf build && pod cache clean --all && pod install
try this
https://stackoverflow.com/a/76072343/10317833