安装 Expo Google Auth 问题

问题描述 投票:0回答:1

我对本地反应还很陌生,所以请耐心等待-

我无法安装 expo google auth,因为我收到此错误,并且我不确定这意味着什么

typepm i expo-google-auth
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error   peer react@">=16.8.0" from @react-native-community/[email protected]
npm error   node_modules/@react-native-community/hooks
npm error     @react-native-community/hooks@"^2.8.1" from [email protected]
npm error     node_modules/tailwind-rn
npm error       tailwind-rn@"^4.2.0" from the root project
npm error   peer react@"*" from @react-native-google-signin/[email protected]
npm error   node_modules/@react-native-google-signin/google-signin
npm error     @react-native-google-signin/google-signin@"^12.2.1" from the root project
npm error   13 more (@react-native/virtualized-lists, ...)
npm error
npm error Could not resolve dependency:
npm error peer react@"^18.3.1" from [email protected]
npm error node_modules/react-dom
npm error   peerOptional react-dom@"*" from @react-native-google-signin/[email protected]
npm error   node_modules/@react-native-google-signin/google-signin
npm error     @react-native-google-signin/google-signin@"^12.2.1" from the root project
npm error   peer react-dom@"^18.0.0" from [email protected]
npm error   node_modules/react-native-web
npm error     react-native-web@"~0.19.10" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/react
npm error   peer react@"^18.3.1" from [email protected]
npm error   node_modules/react-dom
npm error     peerOptional react-dom@"*" from @react-native-google-signin/[email protected]
npm error     node_modules/@react-native-google-signin/google-signin
npm error       @react-native-google-signin/google-signin@"^12.2.1" from the root project
npm error     peer react-dom@"^18.0.0" from [email protected]
npm error     node_modules/react-native-web
npm error       react-native-web@"~0.19.10" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /Users/USER/.npm/_logs/2024-06-19T01_43_27_344Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/USER/.npm/_logs/2024-06-19T01_43_27_344Z-debug-0.log here

所以我尝试使用 --force 标志进行安装并下载。但是,当我这样做时,我的应用程序无法渲染。

无法安装,使用 --force 时应用程序无法渲染。

react-native expo google-oauth
1个回答
0
投票

Expo Google Auth 问题经常出现的原因是:

  • 依赖冲突:确保所有expo包都是最新的并且一致。检查与其他库的冲突。
  • 配置错误:仔细检查app.json或app.config.js,特别是Android的方案。确保您的 Google Cloud 项目凭据准确。
  • iOS 怪癖:在您的 Apple 开发者帐户中启用“使用 Apple 登录”,即使不使用它也是如此。
  • Android 问题:清除 Expo Go 缓存。如果独立构建失败,请检查 build.gradle 是否缺少应用插件:“com.google.gms.google-services”。
  • Expo SDK 48+:请参阅 GitHub 问题以获取潜在修复:https://github.com/expo/expo/issues/21944
  • 社区帮助:在 Stack Overflow 中搜索您遇到的具体错误。 如需进一步帮助,请提供您遇到的确切错误消息。
© www.soinside.com 2019 - 2024. All rights reserved.