Closed jimmyland22 closed 4 months ago
What helped for me is to pin pdf-js package.
Latest version of Pdf-js is already using Promise.withResolver()
, which hasn't been properly introduced in node.js v20.
Using previous version of pdf-js solves the issue.
You may pin it by: npm install pdfjs-dist@4.0.379 --workspace=ingestion
.
Reference: https://github.com/mozilla/pdf.js/issues/17932
Run into the same situation as @jimmyland22 but pinning the pdf-js version didn't help(tried various pdf-js versions, all with same output):
ingestion@1.0.0 build tsc
Running "ingest-files" CLI tool Ingesting 13 file(s)... Ingesting file "./data/xxxxxxxxxxxxxxxxxxxx.pdf"... Error ingesting files: Error ingesting file "./data/Bxxxxxxxxxxxxxxxxxxxxx.pdf": Unknown server error: Promise.withResolvers is not a function
npm list pdfjs-dist azure-openai-rag-workshop@1.0.0 /workspaces/azure-openai-rag-workshop └─┬ ingestion@1.0.0 -> ./src/ingestion └── pdfjs-dist@4.0.189
The ingestion service has been rewritten entirely, so this issue should not occur anymore. Thanks for reporting
Getting stuck in the ingestion step with the following error:
@jimmyland22 ➜ /workspaces/azure-openai-rag-workshop (main) $ ./scripts/ingest-data.sh Loading azd .env file from current environment Installing dependencies and building CLI
up to date, audited 699 packages in 2s
155 packages are looking for funding run
npm fund
for detailsfound 0 vulnerabilities
Running "ingest-files" CLI tool Ingesting 3 file(s)... Ingesting file "./data/privacy-policy.pdf"... Error ingesting files: Error ingesting file "./data/privacy-policy.pdf": Unknown server error: Promise.withResolvers is not a function