Skip to content

Commit

Permalink
Specify pdfWorker to avoid error from PDF.json
Browse files Browse the repository at this point in the history
The error got:
> ⨯ Error: Setting up fake worker failed: "Cannot find module '/SOME_PATH/giselles-ai/giselle/.next/server/chunks/ssr/pdf.worker.mjs' imported from /SOME_PATH/giselles-ai/giselle/.next/server/chunks/ssr/node_modules_pdfjs-dist_build_pdf_mjs_c60773._.js".
    at /SOME_PATH/giselles-ai/giselle/.next/server/chunks/ssr/node_modules_pdfjs-dist_build_pdf_mjs_c60773._.js:12706:42
digest: "3292027865"
  • Loading branch information
Rindrics committed Dec 20, 2024
1 parent 91de0ed commit ed6adad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/opentelemetry/wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { LanguageModelUsage } from "ai";
import type { LanguageModelV1 } from "ai";
import type { PDFDocumentProxy } from "pdfjs-dist";
import { getDocument } from "pdfjs-dist";
import * as pdfWorker from "pdfjs-dist/build/pdf.worker.mjs";
import type { UnstructuredClient } from "unstructured-client";
import type { PartitionResponse } from "unstructured-client/sdk/models/operations/partition";
import type { Strategy } from "unstructured-client/sdk/models/shared";
Expand Down

0 comments on commit ed6adad

Please sign in to comment.