rollbar-react-native icon indicating copy to clipboard operation
rollbar-react-native copied to clipboard

Error on RollbarReactNative.h file imports

Open anunes9 opened this issue 5 years ago • 2 comments

When I try to build the application I got this error regarding "RCTBridgeModule.h". on file "RollbarReactNative.h"

Typedef redefinition with different types ('struct (anonymous struct at .../node_modules/react-native/React/Base/RCTBridgeModule.h:52:16)' vs 'struct RCTMethodInfo')

A solution would be to change the import order on "RollbarReactNative.h" file but I can not do that on my CI client since I don't have access to .h files.

#if __has_include(<React/RCTBridgeModule.h>) #import <React/RCTBridgeModule.h> #else #import "RCTBridgeModule.h" #endif

Any solution on that?

anunes9 avatar Mar 21 '19 15:03 anunes9

+1 same issue. is there a reason for the dynamic import check? seems like the qualified one is always better

kousun12 avatar Jul 03 '19 16:07 kousun12

Same here, the fix provided by @anunes9 worked for me.

Looks like react-native-permissions had the same issue as was patched the same way: https://github.com/yonahforst/react-native-permissions/pull/146/files

marcelkalveram avatar Jul 09 '19 11:07 marcelkalveram