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

Could not resolve dependency: npm ERR! peer react@"^16.5.2" from [email protected]

Open dharshan-webdev opened this issue 3 years ago • 11 comments

dharshan-webdev avatar Apr 30 '21 11:04 dharshan-webdev

I am also experiencing this issue.

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@"^17.0.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.5.2" from [email protected]
npm ERR! node_modules/react-to-pdf
npm ERR!   react-to-pdf@"*" from the root project```

digidub avatar May 12 '21 07:05 digidub

What version of react are you guys using?

Maybe try using the newest version of react-to-pdf (0.0.14)

Givo29 avatar Jun 02 '21 01:06 Givo29

I get the same error while trying to install the Version 0.0.14 of react to pdf

Smartmikey avatar Jul 01 '21 20:07 Smartmikey

@Smartmikey what version of react are you using?

Givo29 avatar Jul 01 '21 20:07 Givo29

I'm having the same problem, using React 17.0.1

Sjark avatar Jul 02 '21 10:07 Sjark

@Givo29 I'm using React version 17.0.1

Smartmikey avatar Jul 02 '21 14:07 Smartmikey

Bump on this! Using React 17.0.2

afrancht avatar Nov 14 '21 23:11 afrancht

I'm having the same issue while working with React 17.0.2

guerillarealty avatar Nov 18 '21 06:11 guerillarealty

Same for me with React 18.0.0

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.5.2" from [email protected]
npm ERR! node_modules/react-to-pdf
npm ERR!   react-to-pdf@"*" 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\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\AppData\Local\npm-cache\_logs\2022-04-18T04_27_36_415Z-debug.log


singhkunal2050 avatar Apr 18 '22 04:04 singhkunal2050

any fix yet? im having same issue

chasedonovan avatar Jun 27 '22 20:06 chasedonovan

The fix for this issue would be to update the package.json file for this project itself.

The workaround would be to npm i --legacy-peer-deps which will cause npm to install this and its peer dependencies (in this case React 16.5.2) it's not ideal, but it works.

Cwittofur avatar Jun 29 '22 20:06 Cwittofur

v1 has been released supporting react > 16.8

ivmarcos avatar Sep 07 '23 20:09 ivmarcos