react-native-facebook-login
react-native-facebook-login copied to clipboard
Fresh install gets 20 Duplicate definition and declaration
With a brand new fresh install of [email protected] getting 20 errors from RCTFBLogin about duplicate definitions and declarations. At the very bottom of all the errors there is an error Apple LLVM 8.0 error but just says "too many errors emitted, stopping now".
i got the same problem ..........
Me too
+1
I think it's an issue with RN 0.40.0. To fix this, try to install npm module like this :
npm install github:magus/react-native-facebook-login --save
You will install the master version which contain support for RN 0.40.0. That's worked for me and saved my night.
(Sorry for my bad english)
Hi All,
I followed the resolution of the following issue and it did the trick for me: https://github.com/facebook/react-native/issues/11725
In addition to RCTBridge, apply to RCTLog and other duplicate definitions. I recommend doing it manually and building after each replacement from "RCTLog.h" to <React/RCTLog.h> for example and see if the number of errors decreases (hence going in the right direction).
I went from 30 errors, to 18, to 7 to 1 to none. Start with the classes under RCTFBLogin.xcodeproj
Sample class after changes:
RCTFBLoginManager.m includes: #import <FBSDKCoreKit/FBSDKCoreKit.h> #import <FBSDKLoginKit/FBSDKLoginKit.h> #import <React/RCTBridge.h> #import <React/RCTEventDispatcher.h> #import <React/RCTLog.h>
#import "RCTFBLogin.h" #import "RCTFBLoginManager.h"
Good luck amigos.
these fixes are in master i presume
https://github.com/magus/react-native-facebook-login/pull/196/files
However not published to npm
so follow @gkueny's advice.
npm install github:magus/react-native-facebook-login --save
Might not really be related to this issue per se, but npm install github:magus/react-native-facebook-login --save
just hangs for me.
@Naoto-Ida hangs for me too :/
@Fantasim I just git cloned in a closeby directory and specified it as a local dependency to work around it.
@Naoto-Ida Yes i did that, @magus is it possible to fix that with npm?
I encountered the above and npm install github:magus/react-native-facebook-login --save
did do the trick. It's true that it just hangs but if you just wait, eventually the module will get installed. (I waited around 2mins)
Ah, my impatience got the better of me. I left it running and got it to install.
npm install github:magus/react-native-facebook-login --save
This really solved my problem. Asking the right question is also so important and time saving!