tRPC standalone server in monorepo
Hi,
I'm using t3-stack monorepo as my base and I've swapped out NextJS backend for standalone HTTP server but I just can't get it work
Discord wouldn't let me post the code as it was too long so I've uploaded the api.ts and client.ts along with the error to gist
https://gist.github.com/neo773/7c8a314785d5e4f54c724cde7e5fa65c
Gist
tRPC standalone server in monorepo
tRPC standalone server in monorepo. GitHub Gist: instantly share code, notes, and snippets.
9 Replies
What doesn’t work? What errors/output?
Check the third file in gist for the error
That’s what I get at this line
Oh are you running all the latest & exact same versions of tRPC dependencies?
That's a new response code we added I think, it's important to keep versions in line
Yes, as I said before I’m using t3 stack monorepo template and the server and client have the same version of trpc
Maybe worth nuking the lock file just to be sure. I’m on the move now so can have another look over later, but it reads like a version mismatch
Turns out it was the package manager bun, installing the deps with pnpm worked fine
It always seems to be bun
They had a new update recently which added support for workspaces so I thought I'd give it a shot, anyway thanks for looking.
Yeah it's a really exciting project, just quite early days and many people have come in with strange issues later found to be Bun's fault
Glad you sorted it 🙂