Jan Henning
TRPCClientError: fetch failed
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.2 replies