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.

  1. Create an app using npx: npx react-native init mob4 --template react-native-template-typescript
  2. Install pods: cd ios && pod install
  3. Open XCode and press Build

Expected Results

Normal stub app

Snack, code example, screenshot, or link to a repository:

Screenshot 2021-02-03 at 13 47 17

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 99
  • Comments: 80 (1 by maintainers)

Commits related to this issue

Most upvoted comments

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:

use_flipper!({ 'Flipper-Folly' => '2.3.0' })

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:

  1. remove ios/Pods
  2. cd ios && pod repo update
  3. sudo gem install cocoapods
  4. npx pod-install

By disabling Flipper in my Podfile it’s worked !

I’m getting the below when I try

def add_flipper_pods!(versions = {})
  versions['Flipper-Folly'] ||= '~> 2.3.0'
[!] CocoaPods could not find compatible versions for pod "Flipper-Folly":
  In Podfile:
    Flipper-Folly (~> 2.3.0)

    FlipperKit/FBCxxFollyDynamicConvert (~> 0.33.1) was resolved to 0.33.1, which depends on
      Flipper-Folly (~> 2.1)

    FlipperKit/FlipperKitNetworkPlugin (~> 0.33.1) was resolved to 0.33.1, which depends on
      FlipperKit/Core (= 0.33.1) was resolved to 0.33.1, which depends on
        Flipper (~> 0.33.1) was resolved to 0.33.1, which depends on
          Flipper-RSocket (~> 1.0) was resolved to 1.3.0, which depends on
            Flipper-Folly (~> 2.5)

Specs satisfying the `Flipper-Folly (~> 2.3.0), Flipper-Folly (~> 2.1), Flipper-Folly (~> 2.5)` dependency were found, but they required a higher minimum deployment target.

Update

Remove the Pod.lock file then run pod 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:

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

Save. Then pod deintegrate and pod 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 your project folder
  • open the ios folder
  • open Podfile comment these lines:
use_flipper!
post_install do |installer|
  flipper_post_install(installer)
end
  • 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:

Screen Shot 2021-02-18 at 03 30 56

thanks @Jorge-Luis-Rangel-Peralta you helped a lot

upgrading flipper to v0.74.0 fixed this issue for me

use_flipper!('Flipper' => '0.74.0')

this is also somehow related to cocoapods version. cocoapods version 1.10.1 + seems to solve most problems while lower versions install flipper dependencies incorrectly

Just update flipper is work. use_flipper!({'Flipper' => '0.79.0'})

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:

use_flipper!({ 'Flipper-Folly' => '2.3.0' })

This fix worked for me. Thanks!

Also, remove Pods/ & Podfile.lock, then run npx pod-install

Just update flipper is work. use_flipper!({'Flipper' => '0.79.0'})

ıts worked for me. thx you

In my case, I solved this by upgrading Flipper to v0.78.0

  1. Made this change on ios/Podfile use_flipper!({'Flipper' => '0.78.0'})
  2. Make sure installed pods are up-to-date pod repo update pod cd ios && pod install && cd ..
  3. Re-run application 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.

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

pod repo update
cd ios && pod install && cd ..

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

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:

use_flipper!({ 'Flipper-Folly' => '2.3.0' })

After 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 🙏

image

@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

def add_flipper_pods!(versions = {})
  versions['Flipper-Folly'] ||= '~> 2.3.0'

or use_flipper!({ 'Flipper-Folly' => '2.3.0' })

Experiencing this exact error on our end.