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

February 12, 2021

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 Usingreact-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

event2/event-config.h’ file not found in React-Native

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' => '0.74.0' })
 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.FacebookJust 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 useflipper with a specific version in iOS/Podfile, for example: `useflipper!({ ‘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.


Written by Manoj Bhardwaj who lives and works in Dharamshala Himachal Pradesh (India). My stackoverflow