TRPCClientError: fetch failed
I get the below error when createTRPCProxyClient runs on BE of a Next.JS app hosted on Vercel:
I've been struggling for a while, and have no clue what's going on. Anybody experienced something similar? It seems to be coming from undici polyfilling fetch for node, but that's as far as I can go before the guessing game begins.
This is not happening locally
JH
Jan Henning•189d ago
This thread is one of the top results when googling for
UND_ERR_REQ_CONTENT_LENGTH_MISMATCH
, so thought I'd add my fix to this as I recently encountered it myself.
Using Next.js app router.
First, install fetch-ponyfill.
Then update your httpBatchStreamLink by adding fetch: fetchPonyfill().fetch
.
This solved the issue for me. Hopefully this is resolved in the future and will no longer be necessary to ponyfill.4.8KMembers
View on DiscordMore Posts
inferRouterOutputs not inferringCould anyone point me in the right direction to why my types aren't being inferred here? (Using T3 bModular Router ThoughtsHello, I hope I can convey clearly what I hope to accomplish. To start, I have a monorepo, with a feIssue with trpc fetch when trying to pass Clerk auth to contextI'm currently trying to add Clerk auth to my trpc context, but I just keep getting this error:
`ErrBullMQ + TRPCCurious how to configure BullMQ with TRPC correctly. Currently I have the queue, queueevents, and th