gpt4 book ai didi

javascript - @react-native-google-signin/google-signin/src/GoogleSignin.js 抛出异常 null is not an object(评估 'RNGoogleSignin.SIGN_IN_CANCELLED')

转载 作者:行者123 更新时间:2023-12-04 13:53:17 26 4
gpt4 key购买 nike

我正在为 firebase 项目使用 firebase 实现 GoogleSign。我安装了这三个包:

    "@react-native-firebase/app": "^11.3.0",
"@react-native-firebase/auth": "^11.3.0",
"@react-native-google-signin/google-signin": "^6.0.0",
然后在我的 Login.js 文件中,我将它们导入为:
import auth from '@react-native-firebase/auth'
import { GoogleSignin } from '@react-native-google-signin/google-signin';
然后在里面 function Login(props) {我有
    GoogleSignin.configure({
webClientId: 'MY_WEB_CLIENT_ID.apps.googleusercontent.com'
});
但是一旦我运行,我就会收到此错误:

Error: Requiring module"node_modules/@react-native-google-signin/google-signin/src/GoogleSignin.js",which threw an exception: TypeError: null is not an object (evaluating'RNGoogleSignin.SIGN_IN_CANCELLED')

最佳答案

请运行 pod-install 并在 pod install 上确认

Installing FirebaseAuth (8.1.0)
Installing FirebaseInstallations (8.1.0)
Installing FirebaseMessaging (8.1.0)
Installing GTMAppAuth (1.2.2)
Installing GTMSessionFetcher (1.5.0)
Installing GoogleSignIn (5.0.2)
Installing GoogleUtilities 7.4.1
Installing RNFBAuth (12.1.0)
Installing RNFBMessaging (12.1.0)
Installing **RNGoogleSignin** (6.0.0)

关于javascript - @react-native-google-signin/google-signin/src/GoogleSignin.js 抛出异常 null is not an object(评估 'RNGoogleSignin.SIGN_IN_CANCELLED'),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67135002/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com