We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Parsing PDF as MD fails in production in Nextjs 14
Parsing a pdf file as MD works fine in development, but fails in production, showing this error:
This is my typescript code:
async function getPDFContext(file: File) { if (file) { const pdf2md = require("@opendocsg/pdf2md") const pdfBuffer = await file.arrayBuffer() const pdfContent = await pdf2md(pdfBuffer) return pdfContent } else { return null } }
To Reproduce In a Next.js app:
npm run build
Desktop:
The text was updated successfully, but these errors were encountered:
I am having a similar problem but instead of needing to define the path it doesnt works in the client, it tells me
Error: Setting up fake worker failed: "Failed to resolve module specifier 'pdfjs-dist/legacy/build/pdf.worker'". at eval (pdf.mjs:17147:36)
Sorry, something went wrong.
@ranon-rat @danybeltran please retry with v0.2.0 and close the issue if it works now. Dependency on pdfjs-dist has been removed
No branches or pull requests
Parsing PDF as MD fails in production in Nextjs 14
Parsing a pdf file as MD works fine in development, but fails in production, showing this error:
This is my typescript code:
To Reproduce
In a Next.js app:
npm run build
Desktop:
The text was updated successfully, but these errors were encountered: