Open islam-kamel opened 2 months ago
Same thing here, any fix?
Same thing here, any fix?
Yes, I have already created PR #2888.
I have the same error, in local development build it works, but not on production, this used to work...
I'm on version 3.4.4
I have the same error, in local development build it works, but not on production, this used to work...
I'm on version 3.4.4
@DavidCodesDev
It seems like you're experiencing a production issue with version 3.4.4 of react-pdf
. Here are a few steps you can try to resolve this:
Check for Differences: Ensure there are no differences in the environment configurations between your local development environment and the production environment.
Dependencies: Verify that all dependencies are installed correctly and that there are no version mismatches.
Rebuild: Try clearing the build cache and rebuilding your production build.
I, too, am having the same problem. As a temporary fix, I overwrote the react-pdf types in my project using the solution provided by @islam-kamel in the #2888 pr. At least, it worked for me.
Fixed for me when I upgraded to v4 and downgraded back to 3.4.4 (3.4.5 also was bugged)
I have the same issue using"@react-pdf/renderer": "^4.0.0"
Would be nice to see this fixed in the next version!
Not sure if this is related to this, but if you are usingNextjs and have some errors after upgrading you can move everything that uses this package into its own component and then import it into another component using:
import dynamic from 'next/dynamic'; and setting ssr: false
Not sure if this is related to this, but if you are usingNextjs and have some errors after upgrading you can move everything that uses this package into its own component and then import it into another component using:
import dynamic from 'next/dynamic';
and setting ssr: false
@ElectricCodeGuy
The error will probably continue to appear within the own component
I, too, am having the same problem. As a temporary fix, I overwrote the react-pdf types in my project using the solution provided by @islam-kamel in the #2888 pr. At least, it worked for me.
I'm not too experienced with nodejs, could you please explain how to temporary fix this? Thanks in advance!
I, too, am having the same problem. As a temporary fix, I overwrote the react-pdf types in my project using the solution provided by @islam-kamel in the #2888 pr. At least, it worked for me.
I'm not too experienced with nodejs, could you please explain how to temporary fix this?
Thanks in advance!
@fernando-mendoza
Add this @ts-ignore
as comment just above the function to stop typescript checking
Not sure if this is related to this, but if you are usingNextjs and have some errors after upgrading you can move everything that uses this package into its own component and then import it into another component using: import dynamic from 'next/dynamic'; and setting ssr: false
@ElectricCodeGuy
The error will probably continue to appear within the own component
Depends what the error is.
In my case it is only the SSR part that caused the issue. So disabling SSR for the client leaf fixed it, with no errors inside the component.
Describe the bug After updating to react-pdf v4, I encountered a TypeScript error when using the PDFDownloadLink component. The error occurs when passing a render prop to PDFDownloadLink, specifically when destructuring the BlobProviderParams.
The following TypeScript error is shown:
To Reproduce
Expected behavior The PDFDownloadLink component should work as expected and correctly handle the render prop with the BlobProviderParams state, without any TypeScript errors.
Desktop (please complete the following information):