react-share icon indicating copy to clipboard operation
react-share copied to clipboard

react-share is not working for react 18.2.0

Open abhishekprajapati1 opened this issue 2 years ago • 3 comments

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```

abhishekprajapati1 avatar Sep 30 '22 09:09 abhishekprajapati1

There is already a PR for that, but apparently no one to merge it

totti-rdz avatar Sep 30 '22 17:09 totti-rdz

try installing it by adding --legacy-peer-deps at end of install comman like npm i react-share --legacy-peer-deps

m-Jawa-d avatar Jul 14 '23 11:07 m-Jawa-d

--legacy-peer-deps is sweeping the problem under the carpet 😅

Melonbwead avatar Sep 27 '23 00:09 Melonbwead