-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
ReadableStream type mismatch when deploying to Vercel #7547
Comments
I was getting this error when I set the runtime to 'nodejs' .. once I set it to |
Is there a way to do this without edge runtime? I have dependencies not compatible with edge runtime |
+1 |
(fyi this is still a problem) |
Has anyone figured out a workaround for this yet? I'm having the same issue trying to use https://github.com/xataio/client-ts UPDATE: |
What version of Remix are you using?
2.0.1
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
Expected Behavior
Response returned as expected when endpoint called.
Actual Behavior
The above works well locally, but fails when deploying to Vercel:
{ url: '/chat/completions' }
TypeError [ERR_INVALID_ARG_TYPE]: The "transform.readable" property must be an instance of ReadableStream. Received an instance of ReadableStream
at new NodeError (node:internal/errors:405:5)
at ReadableStream.pipeThrough (node:internal/webstreams/readablestream:363:13)
at AIStream (/var/task/node_modules/ai/dist/index.js:139:29)
at OpenAIStream (/var/task/node_modules/ai/dist/index.js:360:14)
at action4 (/var/task/build/build-nodejs-eyJydW50aW1lIjoibm9kZWpzIn0.js:12965:73)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.callRouteActionRR (/var/task/node_modules/@remix-run/server-runtime/dist/data.js:35:16)
at async callLoaderOrAction (/var/task/node_modules/@remix-run/router/dist/router.cjs.js:3903:16)
at async submit (/var/task/node_modules/@remix-run/router/dist/router.cjs.js:3275:16)
at async queryImpl (/var/task/node_modules/@remix-run/router/dist/router.cjs.js:3233:22) {
code: 'ERR_INVALID_ARG_TYPE'
}
The text was updated successfully, but these errors were encountered: