krishna swaroopa I
krishna swaroopa I

Reputation: 371

'React/RCTBridgeModule.h' file not found when using react native fbsdk

I am using react-native-fbsdk in my application. My react-native version is:0.39.1

I followed the all steps and when I build my project I'm getting the following error.

screenshot

Can anyone please tell me how to solve this.

Upvotes: 3

Views: 7895

Answers (2)

max23_
max23_

Reputation: 6679

The latest version of react-native-fbsdk ( which is 0.5.0) only works with RN >=0.40.

For RN <0.40, do the following:

1) Uninstall react-native-fbsdk:

npm uninstall react-native-fbsdk --save

2) Reinstall with an older version and link it:

npm install [email protected] --save

react-native link react-native-fbsdk

Upvotes: 1

Kevin Amiranoff
Kevin Amiranoff

Reputation: 14468

There was a breaking change in React-Native 0.40 where the headers have been moved to React namespace. If you use a version prior to 0.40 you have to change 'React/RCTBridgeModule.h' to 'RCTBridgeModule.h' inside of RCTFBSDKAppEvents.m

See here for more info : https://github.com/facebook/react-native/releases/tag/v0.40.0

Or you can upgrade your react-native version: https://facebook.github.io/react-native/docs/upgrading.html

Upvotes: 1

Related Questions