brodycj / create-react-native-module

MIT License
665 stars 52 forks source link

Example app build issues with Flipper on iOS #422

Open brodycj opened 3 years ago

brodycj commented 3 years ago

UPDATED:

I have seen sporadic issues with debug build on iOS if Flipper is enabled. I generally disable Flipper before building and running on iOS to save build time.

Here is how I generally disable Flipper on iOS:

for reference: https://github.com/react-native-tvos/react-native-tvos/issues/49#issuecomment-623817146


OUTDATED description from February 2021:

When I tried generating the example with --example-react-native-version react-native@next (gives me react-native@0.64.0-rc.3 at this point), I could not run the example app on iOS. I am getting the following build failure:

In file included from /Users/brodybits/dev/create-react-native-module/tt-D441EEC8-BD92-4E36-8B79-6E76C408DB56/react-native-a-test/example/ios/Pods/Flipper/xplat/Flipper/FlipperClient.cpp:8:
In file included from /Users/brodybits/dev/create-react-native-module/tt-D441EEC8-BD92-4E36-8B79-6E76C408DB56/react-native-a-test/example/ios/Pods/Flipper/xplat/Flipper/FlipperClient.h:16:
In file included from /Users/brodybits/dev/create-react-native-module/tt-D441EEC8-BD92-4E36-8B79-6E76C408DB56/react-native-a-test/example/ios/Pods/Flipper/xplat/Flipper/FlipperInitConfig.h:10:
In file included from /Users/brodybits/dev/create-react-native-module/tt-D441EEC8-BD92-4E36-8B79-6E76C408DB56/react-native-a-test/example/ios/Pods/Headers/Public/Flipper-Folly/folly/io/async/EventBase.h:46:
In file included from /Users/brodybits/dev/create-react-native-module/tt-D441EEC8-BD92-4E36-8B79-6E76C408DB56/react-native-a-test/example/ios/Pods/Headers/Public/Flipper-Folly/folly/io/async/AsyncTimeout.h:19:
In file included from /Users/brodybits/dev/create-react-native-module/tt-D441EEC8-BD92-4E36-8B79-6E76C408DB56/react-native-a-test/example/ios/Pods/Headers/Public/Flipper-Folly/folly/io/async/EventBaseBackendBase.h:21:
In file included from /Users/brodybits/dev/create-react-native-module/tt-D441EEC8-BD92-4E36-8B79-6E76C408DB56/react-native-a-test/example/ios/Pods/Headers/Public/Flipper-Folly/folly/io/async/EventUtil.h:21:
In file included from /Users/brodybits/dev/create-react-native-module/tt-D441EEC8-BD92-4E36-8B79-6E76C408DB56/react-native-a-test/example/ios/Pods/Headers/Public/Flipper-Folly/folly/portability/Event.h:24:
/Users/brodybits/dev/create-react-native-module/tt-D441EEC8-BD92-4E36-8B79-6E76C408DB56/react-native-a-test/example/ios/Pods/Headers/Public/libevent/event.h:44:10: fatal error: 'event2/event-config.h' file not found
#include <event2/event-config.h>
         ^~~~~~~~~~~~~~~~~~~~~~~

I discovered this failure while testing PR #421 (use react-native-init-func to generate example app).

This needs further investigation. Any help from the user community would be much appreciated.

thertzelle commented 3 years ago

What is the best way to get this project running again? Even with 0.63.3 the project is failing for me:

example/ios/Pods/Headers/Public/libevent/event.h:44:10: 'event2/event-config.h' file not found
#include <event2/event-config.h>
brodycj commented 3 years ago

Even with 0.63.3 the project is failing for me: [...]

You may want to try disabling Flipper on iOS, which should give you a faster debug build as well. Here are the steps:

then try building again. For reference: https://github.com/react-native-tvos/react-native-tvos/issues/49#issuecomment-623817146

contfedorov commented 2 years ago

Possibly, this is related to react-native and Flipper version used? I use Flipper 0.141.0 and react-native 0.67.4 in my project, and everything works well yet.