Error on return a PDF
Unanswered
Oak rough bulletgall wasp posted this in #help-forum
Oak rough bulletgall waspOP
const buffer = await renderToBuffer(
<OtpsPdf event={eventFormatted} otps={data} />
);
return new Response(buffer, {
headers: {
"Content-Type": "application/pdf",
"Content-Disposition": `attachment; filename="Codici: ${event.name}.pdf"`,
},
});
`Why this code in a NextJS GET function return an Internal Server error in production (I have deployed on Vercel)
In development everthing works fine.
Thank you