-
Notifications
You must be signed in to change notification settings - Fork 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
Next.JS Support #2429
Comments
I don't known what is next.js. After crash error is? |
same here, i'm getting unexpected 404 even for basic example |
same here. nextjs is a framework. However, both of them can't use pdfmake and will lead to 404 response after we use the same code as the example from pdfmake github. |
Any update on this? |
No. Example or exact description of error for simulation was not provided. |
I've hit this too, and just leaving some notes here in case it helps someone else. I don't really have the capacity to dive deeper at the minute. Running using the development server does not output any error, it just silently fails and returns a 404 for the backend endpoint (an annoying quirk of Next.js in this case?). Happens on any API route. When trying to build a production version of the app, we get a bit more of a stacktrace and an error related to a missing
Chasing up on other threads, it seems that other PDF libraries have had similar issues, and the root cause seems to stem from an upstream package, From what I can tell, the fontkit fork will need to be updated first to consume the fixed It seems that the fix would entail getting the foliojs forks up to date first, or this package switching from using the forks to the original repos, though it'd be up to the maintainers -- there's probably a good reason the forks are being used instead. |
Hi All. I am trying to do server side rendering and am using Next.JS as a framework. Is pdfmake compatible with next.js? My usage of pdfmake works fine in a normal 'node app.js' test. However, if I take it to next.js and put all the functions / pdfmake logic inside of /pages/api it keeps crashing here:
var pdfDoc = printer.createPdfKitDocument(docDefinition);
The text was updated successfully, but these errors were encountered: