简体   繁体   English

react-native-google-signin-无法读取未定义的属性'number'

[英]React-native-google-signin - Cannot read property 'number' of undefined

When I implement import { GoogleSignin } from 'react-native-google-signin'; 当我import { GoogleSignin } from 'react-native-google-signin';实现import { GoogleSignin } from 'react-native-google-signin';

I get this error: Cannot read property 'number' of undefined 我收到此错误: Cannot read property 'number' of undefined

I have removed node_modules and installed again all dependencies but again I got the same error. 我已经删除了node_modules并再次安装了所有依赖项,但是我又遇到了同样的错误。

Check react native version, as in doc : 检查反应本机版本,如doc所示

If you use React Native < v0.40 stick with v0.8.1 (npm install react-native-google-signin@0.8 --save). 如果您将React Native <v0.40坚持使用v0.8.1(npm install react-native-google-signin@0.8 --save)。

If you use React Native < v0.47 stick with v0.10.0 (npm install react-native-google-signin@0.10 --save). 如果您使用React Native <v0.47坚持v0.10.0(npm install react-native-google-signin@0.10 --save)。

Follow the installation guides: Android and iOS 请遵循安装指南: AndroidiOS

Check this issue as well 也检查问题

React has been updated and doesn't include propTypes . React已更新,并且不包含propTypes Replace the import statement in GoogleSignIn.ios.js with below imports: GoogleSignIn.ios.js的import语句替换为以下导入:

import React, { Component } from 'react';
import PropTypes from 'prop-types';

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 反应原生 | 应用程序因“react-native-google-signin”而崩溃 - React Native | App Crash because of “react-native-google-signin” react-native 项目的 Amplify-js 出现登录问题。 TypeError:无法读取未定义的属性“USER_ID_FOR_SRP” - Having SignIn issues with Amplify-js with a react-native project. TypeError: cannot read property 'USER_ID_FOR_SRP' of undefined 反应本机“无法读取未定义的属性” AsyncStorage - React native 'Cannot read property of undefined' AsyncStorage React Native无法读取属性未定义错误 - React Native cannot read property undefined error React Native 无法读取未定义的属性“导航” - React Native Cannot read property 'navigate' of undefined 无法读取属性 '#<webview> ' 未定义的反应本机</webview> - Cannot read property '#<WebView>' of undefined react native @react-native-google-signin/google-signin/src/GoogleSignin.js 抛出异常 null 不是 object(评估 'RNGoogleSignin.SIGN_IN_CANCELLED') - @react-native-google-signin/google-signin/src/GoogleSignin.js threw an exception null is not an object (evaluating 'RNGoogleSignin.SIGN_IN_CANCELLED') 反应本机如何处理无法读取未定义的属性“未定义” - react native how to deal with Cannot read property 'undefined' of undefined 无法读取未定义的属性“导航” - React Native Navigation - Cannot read property 'navigate' of undefined - React Native Navigation 类型错误:无法读取 React Native 中未定义的属性“set” - TypeError: Cannot read property 'set' of undefined in React native
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM