You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if this is within the project's scope, but tracking compatibility with JS runtimes may be useful. I tried using the SDK with Deno, but it failed. Here is the code:
import{zerox}from"npm:zerox";constopenaiAPIKey=Deno.env.get("OPENAI_API_KEY");if(!openaiAPIKey){thrownewError("OPENAI_API_KEY is not set");}constresult=awaitzerox({filePath: "https://omni-demo-data.s3.amazonaws.com/test/cs101.pdf",
openaiAPIKey,});console.log(result);
This is the error:
╰─❯ deno task start ─╯
Task start deno run -A --allow-scripts --env-file main.ts
error: Uncaught (in promise) TypeError: gm.prototype.options is not a function
at Function.subClass (file:///Users/c/d/p/deno-zerox-ocr/deno/node_modules/.deno/[email protected]/node_modules/gm/index.js:108:16)
at new a (file:///Users/c/d/p/deno-zerox-ocr/deno/node_modules/.deno/[email protected]/node_modules/pdf2pic/dist/index.js:1:1026)
at c (file:///Users/c/d/p/deno-zerox-ocr/deno/node_modules/.deno/[email protected]/node_modules/pdf2pic/dist/index.js:1:3611)
at exports.fromPath (file:///Users/c/d/p/deno-zerox-ocr/deno/node_modules/.deno/[email protected]/node_modules/pdf2pic/dist/index.js:1:5080)
at file:///Users/c/d/p/deno-zerox-ocr/deno/node_modules/.deno/[email protected]/node_modules/zerox/node-zerox/dist/utils.js:299:55
at step (file:///Users/c/d/p/deno-zerox-ocr/deno/node_modules/.deno/[email protected]/node_modules/zerox/node-zerox/dist/utils.js:67:23)
at Object.next (file:///Users/c/d/p/deno-zerox-ocr/deno/node_modules/.deno/[email protected]/node_modules/zerox/node-zerox/dist/utils.js:48:53)
at file:///Users/c/d/p/deno-zerox-ocr/deno/node_modules/.deno/[email protected]/node_modules/zerox/node-zerox/dist/utils.js:42:71
at new Promise (<anonymous>)
at __awaiter (file:///Users/c/d/p/deno-zerox-ocr/deno/node_modules/.deno/[email protected]/node_modules/zerox/node-zerox/dist/utils.js:38:12)
same issue using deno as the kernal for jupyter notebooks. postinstall script is also failing, so manually install graphiksmagic and ghostscript, not sure if that's related
I don't know if this is within the project's scope, but tracking compatibility with JS runtimes may be useful. I tried using the SDK with Deno, but it failed. Here is the code:
This is the error:
Useful info:
Here is a repo to reproduce it, it contains both the Deno and Node versions: https://github.com/carloslfu/deno-zerox-ocr.
The text was updated successfully, but these errors were encountered: