close

[Solved] ‘event2/event-config.h’ file not found in React-Native

Hello Guys, How are you all? Hope You all Are Fine. I was trying to build for iOS in react-native, But Unfortunately, build failed cause of this error. ‘event2/event-config.h’ file not found in React-Native. So Here I am Explain to you all possible solution Here.

Without Wasting your time, Lets start This Article to Solve This Error in react-native.

How ‘event2/event-config.h’ file not found in React-Native Occurs ?

I was trying to build for iOS in react-native, But Unfortunately, build failed cause of this error. I am Using react-native v0.63.4.

I Think Its Flipper Issue. When I comment use_flipper! in my Podfile and then I was try to build again and its work.

'event2/event-config.h' file not found

How to solve ‘event2/event-config.h’ file not found in React-Native Issue ?

How to solve ‘event2/event-config.h’ file not found in react native ?

This issue is come up when we update the Xcode version. This issue comes up with flipper-folly files. Here is the Defined all solution with the flipper file and Without the flipper file. follow the below step to solve this error.

Solutions 1

This issue is come up when we update Xcode version. This issue come up with flipper-folly files. Here is Defined all solution with flipper file and Without flipper file. follow below step to solve this error.

Using Flipper File.

If You need a flipper file then there is only one solution for that. You just have to downgrade the flipper version. Just open your Podfile in your ios app project folder and Change these lines of codes.

 use_flipper!({ 'Flipper-Folly' => '2.3.0' }) # update this part
 post_install do |installer|
   flipper_post_install(installer)
 end

Then We have to update our pods. Follow Below steps.

pod update  

OR

 pod install

Also remember to update your cocoapods

sudo gem install cocoapods

This Solution will solve your error.

Without Using Flipper File.

If you don’t need for flipper file. Then you just have to comment out this below line of code. Just open your Podfile in your ios app project folder and comment out these lines of codes.

use_flipper!
post_install do |installer|
  flipper_post_install(installer)
end

Then We have to update our pods. Follow Below steps.

pod update  

OR

 pod install

Also remember to update your cocoapods

sudo gem install cocoapods

Solution 2

It’s a flipper SDK issue. Facebook Just released an update for flipper with v74 and added support for arm64 devices. To make sure you are using the latest version.

  • Android:Bump the FLIPPER_VERSION variable in android/gradle.properties, for example: FLIPPER_VERSION=0.74.0. Run ./gradlew clean in the android directory.
  • iOS:Call use_flipper with a specific version in iOS/Podfile, for example: use_flipper!({ 'Flipper' => '0.74.0' }). Run pod install in the ios directory.
  • we can see how to setup flipper for react-native here: https://fbflipper.com/docs/getting-started/react-native

With above version You can fixed the 'event2/event-config.h' file not found issue.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries.

Also Read

Please Rate Our Solution to Motivate Us For Give Our Best

3 thoughts on “[Solved] ‘event2/event-config.h’ file not found in React-Native”

Leave a Comment