react-native: Cant build react native from box in XCode: 'event2/event-config.h' file not found
Please provide all the information requested. Issues that do not follow this format are likely to stall.
Description
Try to build clear image on iOS using XCode (Version 12.4 (12D4e)).
React Native version:
“react-native”: “0.63.4”, also try 0.63.3
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- Create an app using npx:
npx react-native init mob4 --template react-native-template-typescript
- Install pods:
cd ios && pod install
- Open XCode and press
Build
Expected Results
Normal stub app
Snack, code example, screenshot, or link to a repository:
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 99
- Comments: 80 (1 by maintainers)
Links to this issue
Commits related to this issue
- flipper got fucked by this and i had to hack the version https://github.com/facebook/react-native/issues/30836 — committed to danielkeithw/BBMobile by deleted user 3 years ago
- Patch issue with Flipper gem [30836](https://github.com/facebook/react-native/issues/30836\#issuecomment-772830882) — committed to imjaroiswebdev/react-native-template-typescript by imjaroiswebdev 3 years ago
- Assign flipper version in ios pod https://github.com/facebook/react-native/issues/30836 — committed to dooboolab-community/dooboo-native-ts by hyochan 3 years ago
- [0.63.0] Atomic design removed (#165) Removed `atomic design` presented in #164. We'd rather use this pattern with more freedom. * Android targetApi to 29 * Fixed gesture handler mock - ... — committed to dooboolab-community/dooboo-native-ts by hyochan 3 years ago
This issue is caused by an update to the “Flipper-Folly” pod-spec. If you’d like to keep Flipper enabled, you can override the version in your Podfile:
Disabling Flipper works like a charm.
Go to ios/Podfile
And comment this lines:
use_flipper! post_install do |installer| flipper_post_install(installer) end
Then remove Pods and re-install them
For me I could get around it by:
By disabling Flipper in my Podfile it’s worked !
I’m getting the below when I try
Update
Remove the
Pod.lock
file then runpod install
@michaelgmcd that worked for me too!
If you’re using configurations, this is what I did
use_flipper!({ 'Flipper-Folly' => '2.3.0' }, configurations: ['Debug', 'Staging'])
In PodFile comment out:
Save. Then
pod deintegrate
andpod install
.Worked for me. If you need to use Flipper, people are having success in changing versions above.
same for me. this morning, it was ok. but this evening, after “pod install” on an existing project, I had this line : “removing cocoalibevent” and build failed…
The update is indeed needed to re-activate Flipper, if you do not require it then disable it, if you require it you will have to wait for the update
Using latest versions works for me
use_flipper!({‘Flipper’ => ‘0.91.1’, ‘Flipper-Folly’ => ‘2.6.7’, ‘Flipper-RSocket’ => ‘1.4.3’})
Finally, I found the solution! https://stackoverflow.com/a/66071245
use_flipper!({ ‘Flipper’ => ‘0.74.0’ })
go to the ios folder in the terminal and type pod update
return to your project folder and type react-native start
open a new terminal and type react-native run-ios
that’s it 😃
example below:
thanks @Jorge-Luis-Rangel-Peralta you helped a lot
upgrading flipper to
v0.74.0
fixed this issue for methis is also somehow related to cocoapods version. cocoapods version
1.10.1
+ seems to solve most problems while lower versions install flipper dependencies incorrectlyJust update flipper is work.
use_flipper!({'Flipper' => '0.79.0'})
Also, remove
Pods/
&Podfile.lock
, then runnpx pod-install
ıts worked for me. thx you
In my case, I solved this by upgrading Flipper to v0.78.0
use_flipper!({'Flipper' => '0.78.0'})
pod repo update
pod cd ios && pod install && cd ..
npx react-native run-ios
Choose to use ReactNative you’d better master iOS/Android native development, cause RN is not stable at least development environment.
[Solved] ‘event2/event-config.h’ file not found in React-Native
I followed this https://fbflipper.com/docs/getting-started/react-native/, and it worked like a charm
Mi solución fue:
en el archivo de pods modificar:
use_flipper!({ ‘Flipper-Folly’ => ‘2.3.0’ }) # update this part post_install do |installer| flipper_post_install(installer) end
dentro de la carpeta ios del proyecto ejecutar:
*Pod update.
Este removió la librería que al parecer genera problemas y procedí a compilar.
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
It worked for me with the latest flipper use_flipper!({ ‘Flipper’ => ‘0.95.1’, ‘Flipper-Folly’ => ‘2.6.7’, ‘Flipper-RSocket’ => ‘1.4.3’ })
It worked for me.
My environment is:
“react”: “16.13.1”, “react-native”: “0.63.2”,
Xcode: “12.4”
Update this change on ios/Podfile use_flipper!({‘Flipper’ => ‘0.79.0’})
Make sure installed pods are up-to-date
And build it through Xcode -> Product -> Build
Upgrading flipper to v0.78.0 worked for me (react-native 0.62.2)
fixed this issue for me
add_flipper_pods!('Flipper' => '0.74.0')
https://stackoverflow.com/a/66155893/4948015
This issue was closed because it has been stalled for 7 days with no activity.
It worked for me.
use_flipper!({ ‘Flipper’ => ‘0.122.0’ }) pod install --repo-update
All attempts of change to
use_flipper!({'Flipper' => '*.*.*'})
did not work for me. It always fail the build with the same error https://github.com/facebook/react-native/issues/31181#issuecomment-801802805After upgraded from 0.62.2 to 0.63.4, I got this issue. Fixed by upgrading Flipper-Folly to 2.3.0 in
ios/Podfile
. Thank you 🙏@sotomaque
Update your
ios/Podfile
to target the specific version. Not in the lockfile but the actual Podfile.versions['Flipper-Folly'] ||= '2.3'
Then run from main directory
npx pod-install --repos-update && npm run start -- --reset-cache
Then clean and rebuild from xcode.
regardless of the way you are registering the flipper-folly just force this version 2.3.0 either
or
use_flipper!({ 'Flipper-Folly' => '2.3.0' })
Experiencing this exact error on our end.