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

React v18 is not supported, what should I do ?

Open MedAliBZ opened this issue 3 years ago • 3 comments

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.8.6 || ^17.0.0" from @react-pdf/[email protected]
npm ERR! node_modules/@react-pdf/renderer
npm ERR!   @react-pdf/renderer@"*" 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!

I don't want to force this, because the project is going to production, next week, what should I do ?

MedAliBZ avatar Jul 08 '22 10:07 MedAliBZ

same issue facing Screenshot 2022-07-08 at 7 04 34 PM

appasaheb4 avatar Jul 08 '22 13:07 appasaheb4

https://react-pdf.org/advanced#webpack-config

gajrajantino avatar Jul 11 '22 10:07 gajrajantino

@MohamedAliBouzaiene react-pdf is not compatible with React 18 yet. Please help out in #1879 if you want it to go faster. @appasaheb4 that is not the same issue at all. Your issues should be solved by #1891, once that is released. @gajrajantino this extra config should soon be unnecessary, and the corresponding part of the docs should be removed: https://github.com/diegomura/react-pdf-site/pull/82

carlobeltrame avatar Jul 11 '22 10:07 carlobeltrame

Any new info about merge?

ErykKozyra avatar Oct 25 '22 10:10 ErykKozyra

@ErykKozyra not that I know of. If you want to see this happen, please go to #1879 and help out there by testing whether the proposed fix really works for React 18 and whether it introduces problems with React 17 or 16.

carlobeltrame avatar Oct 26 '22 09:10 carlobeltrame

+1

React 18. Would really like to start using this

michaelsoriano avatar Oct 26 '22 21:10 michaelsoriano

Duplicate of https://github.com/diegomura/react-pdf/issues/1878

jeetiss avatar Dec 23 '22 12:12 jeetiss

Me too getting the same error while deploying npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve 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! peer react@">=16.8.0" from @emotion/[email protected] npm ERR! node_modules/@emotion/react npm ERR! @emotion/react@"^11.10.5" from the root project npm ERR! peer @emotion/react@"^11.0.0-rc.0" from @emotion/[email protected] npm ERR! node_modules/@emotion/styled npm ERR! @emotion/styled@"^11.10.5" from the root project npm ERR! 3 more (@mui/material, @mui/styled-engine, @mui/system) npm ERR! 4 more (@mui/material, @mui/styled-engine, @mui/system, react-select) npm ERR! 20 more (@emotion/styled, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.8.1 || ^17" from [email protected] npm ERR! node_modules/react-alert npm ERR! react-alert@"^7.0.3" from the root project npm ERR! npm ERR! Conflicting peer dependency: [email protected] npm ERR! node_modules/react npm ERR! peer react@"^16.8.1 || ^17" from [email protected] npm ERR! node_modules/react-alert npm ERR! react-alert@"^7.0.3" 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! npm ERR! For a full report see: npm ERR! /opt/render/.cache/_logs/2024-01-27T01_59_16_902Z-eresolve-report.txt npm ERR! A complete log of this run can be found in: /opt/render/.cache/_logs/2024-01-27T01_59_16_902Z-debug-0.log ==> Build failed 😞

yashgupta5532 avatar Jan 27 '24 02:01 yashgupta5532