PinkiePie
trpc doesn't work after migrating to next 15
https://github.com/trpc/trpc/issues/6341 - however it's mostly just a copy-paste of the discussion above, i don't have an isolated project where issue can be reproduced 😦
15 replies
trpc doesn't work after migrating to next 15
@Alex / KATT 🐱 it seems like i narrowed down the issue to the exact file and commit 🙂 The change was introduced in this commit/line: https://github.com/trpc/trpc/commit/87fde62978441b1cedd1d5cf7290f6ade9a92607#diff-981f2f06bfbbee188e14a4f7991f370e9042eb5c21995e24e183ab76acc5ce01R136 and then here https://github.com/trpc/trpc/commit/3df8b21beb4925cf73194fc776d1a88603a3c420#diff-981f2f06bfbbee188e14a4f7991f370e9042eb5c21995e24e183ab76acc5ce01L136
req.socket
exists locally with node, but it seems like it doesn't exist in lambdas environment (next adapter with netlify backed by aws). so, it fails on this line. In this env, request object is an instance of ComputeJsIncomingMessage
class - I don't really know if it comes from next itself, or from lambdas, it's what i've seen when i put console.log
in trpc code using yarn patch
. It looks like this issue has nothing to do with nextjs upgrade, but with the fact i didn't pin exact trpc version but used "@trpc/server": "next"
, and it was unintentionally upgraded together with nextjs. As a temporary workaround i reverted it back to a version before this change was introduced (11.0.0-rc.608), and now everything works fine15 replies