I am trying to install Stripe NPM Package into react project using npm but unable to install it. Here is the error showing into the terminal.
PS C:\Users\adity\OneDrive\Desktop\stripe-payments> npm i @stripe/react-stripe-js
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: stripe-payments@0.1.0
npm ERR! Found: react@18.0.0
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.8.0 || ^17.0.0" from @stripe/react-stripe-js@1.7.0
npm ERR! node_modules/@stripe/react-stripe-js
npm ERR! @stripe/react-stripe-js@"*" 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\adity\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\adity\AppData\Local\npm-cache\_logs\2022-03-31T12_21_47_015Z-debug-0.log