-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React 18 peerDeps problem #1878
Comments
fwiw we're using react@18 without any issues other than the warnings from yarn:
|
@modosc We are also able to use it, but it seems like a trivial task to just add version 18 to the peer dependencies. I seem to have forgotten to add the PR here. Sorry - that would be confusing. Did that now. |
@rasmusrim Im not so sure is that trivial. We tried supporting react 17 with the same fix in the past but things didn't worked, due to the react-reconciler being from a different version. I need to dig deeper in this |
@diegomura Thank you so much for working on this. I will see if I can spend some time looking into this next week. We really rely on this tool! |
I see that the reconciler is a problem, but do we need to upgrade that package? I set up a sandbox environment which uses the changes in my PR to render all the example PDFs here: https://github.com/rasmusrim/react-pdf-sandbox I run into some problems doing the same in our project. I will look a bit more into it. |
The problem seems to be this package: https://github.com/ai/size-limit/tree/main/packages/time. It installs React 17 so there are two versions of React. But that is only a devDependency, so doing a production build of @react-pdf, leaves me with only one version of React. |
@diegomura Have you had time to dig deeper into this issue yet? Have you found anything in regards to this that you can share? There is this PR, are there any issues with it? If so, please comment here and in the PR. I appreciate your hard work! |
I'm having an issue similiarly, with it not recognizing react 18 and it spitting an error saying react dependency peer react@"^16.8.6 || ^17.0.0" |
You can try out this one: https://www.npmjs.com/search?q=react-18-pdf It comes with absolutely no warranties or gurantees! I do not have time to maintain this, and will remove it as soon as I can. |
@rasmusrim So |
It should, yes. But right now it doesn't build on my system. Will see if I have some more time to look into it later. Please tell me how you are faring! |
after installing |
I have the same issue |
create-react-app error with react 18.2.0 since react-pdf seems to only support up to react 17.0.0, will this soon get updated? |
Would it be possible to release this under |
I trying to use this but in react 18.2.0 don't work |
Still do not work :( |
exactly, unfortunately it's not working with react 18. I found another repository (similar) that has served me well |
Cool, could you link me to this repo. I am using pdfkit instead, but right now I have to make pdf on sercer side.... which is not what I want it... cuz I can't use react now to style pdf format.... :( |
I'm using react-to-print. It generates the pdf and shows the user the option to print from the browser (which is exactly what I needed). I don't know if it will work for you bro, but I hope so! Repo: https://github.com/gregnb/react-to-print#readme |
Also sad about this not working but it got me to do an open experiment to generate pdfs server-side with React as a template engine. still a WIP but got it to work end-to-end so far if you are able to generate PDFs server-side then maybe this research will help someone https://dev.to/lwhiteley/react-and-puppeteer-pdf-generation-project-setup-1he2 |
Still not working... |
For those wanting to use
I documented those two things in detail in the following gist: And I demonstrated them in the following video (the demo begins at the 1:20 mark): |
Shall we get this fixed soon? |
Bump |
This would be majorly helpful to get this supported at React |
I'm facing the same issue and it is compromising the whole system |
Should support React 18
The text was updated successfully, but these errors were encountered: