react-native-facebook-login icon indicating copy to clipboard operation
react-native-facebook-login copied to clipboard

Fresh install gets 20 Duplicate definition and declaration

Open shawnmacburnie opened this issue 8 years ago • 13 comments

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".

screen shot 2017-02-06 at 6 30 49 pm

shawnmacburnie avatar Feb 06 '17 23:02 shawnmacburnie

i got the same problem ..........

seoyoungrag avatar Feb 07 '17 00:02 seoyoungrag

Me too

antonioromano avatar Feb 07 '17 11:02 antonioromano

+1

hugheba avatar Feb 08 '17 21:02 hugheba

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)

gkueny avatar Feb 10 '17 20:02 gkueny

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.

aliechihabi avatar Feb 10 '17 23:02 aliechihabi

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

lwhiteley avatar Feb 10 '17 23:02 lwhiteley

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 avatar Feb 21 '17 08:02 Naoto-Ida

@Naoto-Ida hangs for me too :/

Fantasim avatar Feb 21 '17 08:02 Fantasim

@Fantasim I just git cloned in a closeby directory and specified it as a local dependency to work around it.

Naoto-Ida avatar Feb 21 '17 08:02 Naoto-Ida

@Naoto-Ida Yes i did that, @magus is it possible to fix that with npm?

Fantasim avatar Feb 21 '17 08:02 Fantasim

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)

leaky avatar Feb 21 '17 20:02 leaky

Ah, my impatience got the better of me. I left it running and got it to install.

Naoto-Ida avatar Feb 22 '17 08:02 Naoto-Ida

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!

giftedunicorn avatar Mar 24 '17 03:03 giftedunicorn