我正在使用以下命令来安装react-google-login for React npm install react-google-login 但它不起作用
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^18.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16 || ^17" from [email protected]
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 /Users/Baran/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Baran/.npm/_logs/2022-03-30T04_33_37_205Z-debug-0.log
尝试使用
npm install react-google-login --force
或
npm install react-google-login --legacy-peer-deps
软件包
react-google-login
已被弃用。
您可以使用
@leecheuk/react-google-login
套餐。
供参考 - https://www.npmjs.com/package/@leecheuk/react-google-login
或
您可以使用
@react-oauth/google
套餐。