-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
jpeg-exif: can't resolve 'fs' #2535
Comments
I have the same issue. It only started today. I'm also using "@react-pdf/renderer": "3.1.9" |
I have the same issue that also started today or just super recently. When I try to build, I get that error. I'm using |
Everybody who's using this in Next.js app dir will have this issue because the bug was introduced in an internal dependency, not in the renderer package. Even downgrading isn't an option because it's a minor version and package managers will install automatically the latest minor (and patch) version of pdfkit. |
Yeah, I was trying to track down the dep that was just recently updated to see if I could find it, but I couldn't find it. It says the issue is with
|
as a work around both yarn@4 and pnpm should be able to provide you a way to override the version of any transient dependancy you feel like you've no control over: |
i found that you can add craco to override the node modules and it works with both start and build.
module.exports = {
|
I had the same issue, using just the webpack fallback without craco worked for me. Just added this to my
|
This is working for me
|
This works for me as well! thanks
|
This seems to have been introduced in a35b1ba It would be great if you could revert it and not release it in a minor version in the future. |
if you are using yarn, you can add to your package.json:
it should work as a workaround for the time being |
for npm fix
but yes, we should wait a fix from author |
Submitted a change in failing lib zhso/jpeg-exif#36 Hopefully will be included soon, otherwise I might need to fork it or find another solution |
it has 2y ago last commit and owner has last commit at April, looks like create you own modern version of this will be better solution. Thank you for fast responding! |
I still need to give him a chance |
If jpeg-exif is stable there's absolutely no reason to be jumping to fork it right away. The fact that it's had a total of 9 issues in its life, and this is one of them, suggests it's a tightly scoped package that does a good job (though it's only recently that the number of installs has jumped up!) |
Agree @ThomasRedstone ! That lib does way more that what it's used for in here though. So if my PR does not get reviewed in time I might just port the only bit we need to pdfkit (both our fork and the original repo). Can't be halted forever. As said above I still want to give it a chance |
any solve? |
@diegomura no creo que sea buena idea que utilices una librería sin mantenimiento desde 2019, y con 12 estrellas en github, le bajas el nivel a esta tremenda librería que es react-pdf. Abrazo |
@felipehv gracias por el feedback. Esta libreria la usa pdfkit desde hace ya un tiempo. Si quiero eventualmente usar el proyecto original (lo cual es deseable) tengo que lentamente solucionar las diferencias. El hecho de que no se mantenga desde el 2019 o mucho menos las estrellas que tenga no hace una libreria mejor o peor. En este caso lo importante es simplemente que utiliza una dependencia de Node que no vi al integrarlo |
up up |
I tried this workaround and it works fine in development mode, but I got this error when attempting to run
(Likewise with other components I used: View, Page, Image, BlobProvider) My dependencies:
|
I'm using react-pdf in a library and using rollup to build it, all users of the library are facing the same error (Module not found: Error: Can't resolve 'fs'). I'm using rollup, any ideas if I can fix the issue? Can I add something in the rollup config? Listed below:
|
Issue with exceljs after updating dependencies I attempted to fix issue by updating dependencies in my project's package.json (we are using npm): However, after making these changes, I encountered a new problem with exceljs, resulting in the error: "Uncaught SyntaxError: Invalid or unexpected token (at exceljs.bundle). This issue is critical as it affects our production build. Can someone please provide guidance or a fix for resolving this? |
This works with yarn: "resolutions": {
"@react-pdf/image": "2.2.3",
"@react-pdf/pdfkit": "3.0.4",
"@react-pdf/layout": "3.5.0"
}, This may work for npm, however I have not personally tested it: "overrides": {
"@react-pdf/image": "2.2.3",
"@react-pdf/pdfkit": "3.0.4",
"@react-pdf/layout": "3.5.0"
}, |
@Kiborgik Thanks, this is working in local , but fails in Azure CI pipeline, Any fix for it? |
@diegomura can you please create your own fork until they respond to your pull request? We are building a software that is installed by developers using either pnpm, yarn, npm or bun. We cannot have a quick fix to match them all. |
+1 Experiencing the same issues. Using the resolutions partially works. Was working fine on version 3.1.12 |
Describe the bug
To Reproduce
// page.tsx
/// pdf-viewer.tsx
Expected behavior
I expect it to not use any Node.js functions because if I remove the
use client
I get this error:Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: