javascript - Unable to resolve module `./index.android` from The module `./index.android` could not be found from Indeed, 这些文件都不存在:
问题描述
当我使用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 auth 代码
解决方案
您导入文件的方式是错误的。检查您正在导入的路径并更正它。它会工作
推荐阅读
- algorithm - 如何确定是否可以接受排行榜?
- php - 可以在 Laravel / PHPUnit 中模拟模型方法输出吗?
- php - PDO 查询未将数据插入 MySQL 数据库,未显示任何错误
- oauth-2.0 - 使用 oAuth 退出 Microsoft AAD 时,有没有办法避免“选择帐户”提示?
- php - 如何更改 wordpress 主题的语言?
- python - 如何使用没有 IOError 的 GCS 路径加载文件?
- csv - 当它不是文件的第一行时如何自动设置标题?
- ssms - SQL Server Management Studio 17.9 字体大小不起作用
- javascript - $(document).ready 故障,$(document).resize 有效 - 相同的处理程序
- java - OpenJDK 11.0.2 的 Spring Boot 2.0 请求映射问题