react-share
react-share copied to clipboard
react-share is not working for react 18.2.0
I am installing react-share for my project but it is throwing following issue.
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.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.3.0 || ^17" from [email protected]
npm ERR! node_modules/react-share
npm ERR! react-share@"*" 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\ARS\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\ARS\AppData\Local\npm-cache\_logs\2022-09-30T09_49_06_524Z-debug-0.log```
There is already a PR for that, but apparently no one to merge it
try installing it by adding --legacy-peer-deps at end of install comman like
npm i react-share --legacy-peer-deps
--legacy-peer-deps
is sweeping the problem under the carpet 😅