react-native
react-native copied to clipboard
[iOS] [0.68.0-rc.4] 'react/config/ReactNativeConfig.h' file not found
Description
When running the latest RC via iOS using the new architecture, I am running into the following error:
/Users/alex/Documents/Projects/DemoFabricProject/node_modules/react-native/ReactCommon/react/renderer/scheduler/Scheduler.h:14:10: 'react/config/ReactNativeConfig.h' file not found
#include <react/config/ReactNativeConfig.h>
Version
0.68.0-rc.4
Output of npx react-native info
System: OS: macOS 12.3 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 1.45 GB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.14.2 - /usr/local/bin/node Yarn: 3.2.0 - ~/.yarn/bin/yarn npm: 8.5.0 - /usr/local/bin/npm Watchman: 2022.03.21.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /Users/alex/.rbenv/shims/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: API Levels: 28, 30, 31, 32 Build Tools: 29.0.2, 30.0.2, 30.0.3, 32.0.0 System Images: android-31 | Google APIs Intel x86 Atom_64, android-31 | Google Play Intel x86 Atom_64, android-32 | Google APIs Intel x86 Atom_64, android-32 | Google Play Intel x86 Atom_64 Android NDK: Not Found IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8193401 Xcode: 13.3/13E113 - /usr/bin/xcodebuild Languages: Java: 11.0.14.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
Install project using 0.68.0-rc.4 and follow the steps provided by the upgrade helper.
Snack, code example, screenshot, or link to a repository
No response
I am seeing a similar issue:
❌ /Users/renchap/dev/project/packages/mobile/ios/Pods/Headers/Private/React-Codegen/react/renderer/components/rncore/EventEmitters.h:12:10: 'react/renderer/components/view/ViewEventEmitter.h' file not found
#include <react/renderer/components/view/ViewEventEmitter.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I removed my ios/build/
and ios/Pods/
, rebuilt everything, and it now compiles with RN 0.68.0. @AlexanderEggers have you tried this?
same issue, I can't build my project when upgrade to 0.68
fatal error: 'react/config/ReactNativeConfig.h' file not found
I clean all cache, build, node_modules, Pods, and reinstall it. But still issue, hope we can fix it soon.
@AlexanderEggers I found something in Reanimated, I can't build if we have Reanimated. Do you use Reanimated in your app?
@baveku Yep I am using that - might indeed be related to that. Regarding reanimated generally, the PR https://github.com/facebook/react-native/commit/58a2eb7f37c2dc27ad3575618778ad5b23599b27 would unblock the new architecture for reanimated which is planned for 0.68.1. But I think reanimated generally needs to add support to the new architecture first anyway. It is strange that fatal error: 'react/config/ReactNativeConfig.h' file not found
would be thrown in this case - seems strange to me.
Cannot build ios app with v0.68 on with or without New Architecture Enabled.
I have had patience for many days trying diff methods but still was not able to fix any and had to come up here and report.

Cannot build ios app with v0.68 on with or without New Architecture Enabled.
I have had patience for many days trying diff methods but still was not able to fix any and had to come up here and report.
![]()
Yes i have the same problem, so I make new project on New Template without follow migrate doc in reactnative.dev and replace file in AppDelegate.mm and reinstall all package, It's work, you can replace new Appdelegate.mm to fix it ;)
Cannot build ios app with v0.68 on with or without New Architecture Enabled.
I have had patience for many days trying diff methods but still was not able to fix any and had to come up here and report.
Yes i have the same problem, so I make new project on New Template without follow migrate doc in reactnative.dev and replace file in AppDelegate.mm and reinstall all package, It's work, you can replace new Appdelegate.mm to fix it ;)
Thanks Your. suggestion works for me.
The content of project.pbxproj
was the culprit, i just initialise a new react-native project and copied project.pbxproj
into the existing project and the build works.
I removed my
ios/build/
andios/Pods/
, rebuilt everything, and it now compiles with RN 0.68.0. @AlexanderEggers have you tried this?
I was having a similar issue after enabling and disabling :fabric_enabled but this fixed it for me
Closing as this has been reported as fixed + this issue was related to a RC version of RN. We now released 0.68.2 stable.
Closing as this has been reported as fixed + this issue was related to a RC version of RN. We now released 0.68.2 stable.
I have this issue in 0.68.2
Cannot build ios app with v0.68 on with or without New Architecture Enabled.
I have had patience for many days trying diff methods but still was not able to fix any and had to come up here and report.
Yes i have the same problem, so I make new project on New Template without follow migrate doc in reactnative.dev and replace file in AppDelegate.mm and reinstall all package, It's work, you can replace new Appdelegate.mm to fix it ;)
Thanks Your. suggestion works for me.
The content of
project.pbxproj
was the culprit, i just initialise a new react-native project and copiedproject.pbxproj
into the existing project and the build works.
I was able to build the same way. Created new project. Opened in xcode beside my project and compared settings. Now it builds.
Can anyone post diffs of their project files?
I'm also getting the same issue:
seems like it's related to react-native-reanimated "react-native-reanimated": "^2.8.0", "react-native": "^0.68.1",
I'm also getting the same issue:
seems like it's related to react-native-reanimated "react-native-reanimated": "^2.8.0", "react-native": "^0.68.1",
yes, Reanimated v2 not support new Architecture, We need to wait for Reanimated release v3, Maybe next month, we can use it. Announcing Reanimated 3
Same error with me too: I tried other solutions too, but there is not third-party folder exist. here is the error I guess:
ios/Pods/glog/src/base/mutex.h:105:10: fatal error: 'config.h' file not found
#include "config.h" // to figure out pthreads support
^~~~~~~~~~
Here is my current configuration:
System:
OS: macOS 12.4
CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
Memory: 50.68 MB / 8.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.15.0 - /usr/local/bin/node
Yarn: 1.22.18 - /usr/local/bin/yarn
npm: 8.10.0 - /usr/local/bin/npm
Watchman: 2022.06.13.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8512546
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.15 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.2 => 0.68.2
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Same error with me too: I tried other solutions too, but there is not third-party folder exist. here is the error I guess:
ios/Pods/glog/src/base/mutex.h:105:10: fatal error: 'config.h' file not found #include "config.h" // to figure out pthreads support ^~~~~~~~~~
Here is my current configuration:
System: OS: macOS 12.4 CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz Memory: 50.68 MB / 8.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.15.0 - /usr/local/bin/node Yarn: 1.22.18 - /usr/local/bin/yarn npm: 8.10.0 - /usr/local/bin/npm Watchman: 2022.06.13.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Not Found IDEs: Android Studio: 2021.2 AI-212.5712.43.2112.8512546 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild Languages: Java: 11.0.15 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-macos: Not Found npmGlobalPackages: *react-native*: Not Found
I have this issue and I have resolve it, with just this command, npx react-native-clean-project
I have no idea what this pkg cleanup but now my project is able to run on iOS & android both with the latest version of react [email protected].
npx react-native-clean-project
worked for me as well with react [email protected] in both android and ios
Hi, I'm still facing that error with 0.68.x and 0.69.x, any idea?
My config is:
"react-native-reanimated": "2.9.1",
"react-native-screens": "3.15.0",
"react-native": "0.68.2",
"react-native-safe-area-context": "4.1.4",
have you managed to solve it @baveku ?
Hi, I'm still facing that error with 0.68.x and 0.69.x, any idea?
My config is:
"react-native-reanimated": "2.9.1", "react-native-screens": "3.15.0", "react-native": "0.68.2", "react-native-safe-area-context": "4.1.4",
have you managed to solve it @baveku ?
you are using Fabric, right? Reanimated 2 doesn't support Fabric, you can use Reanimated 3(Beta) to work with Fabric. I am still waiting for the Swmansion release Reanimated3, Read this blog: Announcing Reanimated 3
you are using Fabric, right? Reanimated 2 doesn't support Fabric, you can use Reanimated 3(Beta) to work with Fabric. I am still waiting for the Swmansion release Reanimated3, Read this blog: Announcing Reanimated 3
Yes, I've enabled Fabric, I'm trying to enable the new Architecture by using RN 0.68 and 0.69, but seems RNReanimated still can't support it as you've mentioned and it's mentioned here as well https://blog.swmansion.com/announcing-reanimated-3-16167428c5f7.
Also the "Software Mansion" has mentioned it here https://twitter.com/swmansion/status/1524382441095446528?s=20&t=umd4xaf4mxBR_dO9XS-8lA but seems they still continue working on it.
cc: @piaskowyk @kmagiera
Thanks, for the early response, I appreciated it @baveku.
Hey all! In order to use Reanimated with Fabric enabled, you must first update to 0.69+.
Reanimated 3.0.0-rc.0 with Fabric enabled does not support React Native 0.68.x.
For more details, check out the comment on the issue in Reanimated repo:
- https://github.com/software-mansion/react-native-reanimated/issues/2991#issuecomment-1197886823
Hey all! In order to use Reanimated with Fabric enabled, you must first update to 0.69+.
Reanimated 3.0.0-rc.0 with Fabric enabled does not support React Native 0.68.x.
For more details, check out the comment on the issue in Reanimated repo:
When does Reanimated 3 release? I saw Reanimated 3 rc0 a long time
When does Reanimated 3 release? I saw Reanimated 3 rc0 a long time
Reanimated 3.0.0-rc.0 supports all features of Reanimated 2 except for Layout Animations.
See this comment for more details:
- https://github.com/software-mansion/react-native-reanimated/issues/3439#issuecomment-1205382650
TL;DR We will release 3.0.0 (stable) once we add Layout Animations for Fabric.
I removed my
ios/build/
andios/Pods/
, rebuilt everything, and it now compiles with RN 0.68.0. @AlexanderEggers have you tried this?
Thanks! This worked for me as well. Upgrade tool with mono-repo react-native app with multiple Xcode schemes didn't work correctly for me so I had to create fresh project.
I removed my
ios/build/
andios/Pods/
, rebuilt everything, and it now compiles with RN 0.68.0. @AlexanderEggers have you tried this?
I was about to give up all hope, until I did this. Thanks you sir!
I removed my
ios/build/
andios/Pods/
, rebuilt everything, and it now compiles with RN 0.68.0. @AlexanderEggers have you tried this?
didn't work for React Native
version 0.70.5
coming in Expo
version 47
. @tomekzaw, I can see the latest rc
is 3.0.0-rc.10
. Might I ask what's your timelines to look into this?
Changing all AppDelegate.m
into AppDelegate.mm
inside project.pbxproj
(a file with temptation not to look into) worked for me.
Still running into this issue, even with React Native @ 0.71.3
, Reanimated @ 2.8.0
, and an updated toolchain. Removing ios/build/
, ios/Pods/
and cleaning the project didn't resolve it, and my AppDelegate
inside project.pbxproj
already has a .mm
file extension. What am I missing?
Hey @atticusliu, do you use the new architecture of React Native?