无法从模块中解析模块`。/ index.android`。实际上,以下文件均不存在:

时间:2019-04-11 07:11:27

标签: javascript android react-native

当我使用Firebase将facebook auth与react-native连接时会生成错误

fbAuth() {
LoginManager.logInWithReadPermissions([
  "public_profile",
  "user_friends",
  "email"
]).then(
  result => {
    if (result.isCancelled) {
      Alert.alert("Whoops!", "You cancelled the sign in.");
    } else {
      AccessToken.getCurrentAccessToken().then(data => {
        const credential = firebase.auth.FacebookAuthProvider.credential(
          data.accessToken
        );
        firebase
          .auth()
          .signInWithCredential(credential)
          .then(loginUserSuccess(dispatch))
          .catch(error => {
            loginSingUpFail(dispatch, error.message);
          });
      });
    }
  },
  error => {
    Alert.alert("Sign in error", error);
  }
);}

有没有模块的问题,发现这是我的代码,我在其中集成了fb身份验证代码

1 个答案:

答案 0 :(得分:0)

导入文件的方式是错误的。检查您要导入的路径并进行更正。会起作用