我试图在我的应用程序中安装react google-登录包,我得到了以下错误:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: reactjs-training@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 install --legacy-peer-deps 但错误仍然存在。
有什么暗示或想法,我为什么会有这个错误?
Im使用NPMV8.6.0
发布于 2022-11-11 00:57:18
谷歌登录的JavaScript平台库已经停用.你应该在网络上使用新的谷歌身份服务
用这个代替:
React OAuth2 \ Google
npm i @react-oauth/google发布于 2022-08-12 19:03:59
强制安装npm包装,或使用如下纱线:
npm install react-google-login --force或
yarn add react-google-login发布于 2022-11-02 11:22:42
run :
npm install --legacy-peer-deps and :
npm config set legacy-peer-deps true在这些之后,您可以简单地运行npm i react-google-login,但是您应该知道react google登录有点过时,不适合于run 18。
https://stackoverflow.com/questions/73338626
复制相似问题