-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "UnknownErrorException: The browser/environment lacks native support for critical functionality used by the PDF.js library (e.g. Path2D
and/or ReadableStream
); please use a legacy
-build instead.".] {
code: 'ERR_UNHANDLED_REJECTION'
}
Usage:
import { PDFLoader } from "langchain/document_loaders";
export const run = async () => {
const loader = new PDFLoader("src/sample.pdf");
const docs = await loader.load();
console.log(docs);
};
run();
Metadata
Metadata
Assignees
Labels
No labels