Skip to content
New issue

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

The new version (v 0.18.1) cannot run in edge runtime. #127

Open
mggger opened this issue Oct 9, 2024 · 3 comments
Open

The new version (v 0.18.1) cannot run in edge runtime. #127

mggger opened this issue Oct 9, 2024 · 3 comments

Comments

@mggger
Copy link

mggger commented Oct 9, 2024

Hi @awalker4

I am using the latest version 0.18.1, but encountered an error and cannot run it under edge runtime.

 ⨯ Error [UnexpectedClientError]: Unexpected HTTP client error: Error: The edge runtime does not support Node.js 'crypto' module.
Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
    at eval (webpack-internal:///(middleware)/./node_modules/unstructured-client/lib/sdks.js:186:45)
    at async generalPartition (webpack-internal:///(middleware)/./node_modules/unstructured-client/funcs/generalPartition.js:181:22)
    at async unwrapAsync (webpack-internal:///(middleware)/./node_modules/unstructured-client/sdk/types/fp.js:31:15)
    at async processWithUnstructured (webpack-internal:///(middleware)/./src/pages/api/upload/extract.js:67:17)
    at async Object.handler (webpack-internal:///(middleware)/./src/pages/api/upload/extract.js:234:30)
    at async adapter (webpack-internal:///(middleware)/./node_modules/next/dist/esm/server/web/adapter.js:176:16)
    at async runWithTaggedErrors (file:///Users/home/git/chatbots/abcb/node_modules/next/dist/server/web/sandbox/sandbox.js:99:24)
    at async DevServer.runEdgeFunction (file:///Users/home/git/chatbots/abcb/node_modules/next/dist/server/next-server.js:1166:24)
    at async NextNodeServer.handleCatchallRenderRequest (file:///Users/home/git/chatbots/abcb/node_modules/next/dist/server/next-server.js:245:37)
    at async DevServer.handleRequestImpl (file:///Users/home/git/chatbots/abcb/node_modules/next/dist/server/base-server.js:791:17)
@awalker4
Copy link
Collaborator

awalker4 commented Oct 9, 2024

Ah, apologies about that! I'll get a fix going - in the meantime the workaround would be to use splitPdfPage: false.

@mggger
Copy link
Author

mggger commented Oct 10, 2024

@awalker4 Setting it to false still results in the same error.

@silvafabian
Copy link

@awalker4 Was there an update to this fix? I am running into the same issue using quasar-cli-webpack with vue3. I tried running it on localhost and get the same error as @mggger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants