首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法安装react google-登录

无法安装react google-登录
EN

Stack Overflow用户
提问于 2022-08-11 10:11:58
回答 1查看 249关注 0票数 0

试图通过使用命令npm install react-google-login安装“react google”。它给出了以下错误:

代码语言:javascript
复制
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: my-app@0.1.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   react@"^18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16 || ^17" from react-google-login@5.2.2
npm ERR! node_modules/react-google-login
npm ERR!   react-google-login@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\prajw\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\prajw\AppData\Local\npm-cache\_logs\2022-08-11T09_50_55_555Z-debug-0.log

无法理解到底出了什么问题。自从react升级到18版以来,我们以前的使用方式发生了很多变化。

EN

回答 1

Stack Overflow用户

发布于 2022-08-11 10:16:46

不知道为什么但不知怎么起作用了。

代码语言:javascript
复制
npm config set legacy-peer-deps true
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73318954

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档