react-pdf
react-pdf copied to clipboard
React v18 is not supported, what should I do ?
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 ?
same issue facing

https://react-pdf.org/advanced#webpack-config
@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
Any new info about merge?
@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.
+1
React 18. Would really like to start using this
Duplicate of https://github.com/diegomura/react-pdf/issues/1878
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 😞