Mono Repo Deployment on Vercel Hono & Orpc #759
-
I've been trying to deploy the backend server on vercel, I am using https://better-t-stack.dev/new to scaffold the project. But running into all kinds of weird errors. Is there an example of using hono & orpc that deploys on vercel |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
Hi @arpitjacob! I'm Dosu and I’m helping the orpc team. There isn't an official example or dedicated documentation for deploying a Hono & orpc backend on Vercel, especially in a monorepo setup. However, it is possible with the right configuration. The main pitfalls are TypeScript type inference issues across monorepo boundaries—these can break both local dev and Vercel builds. Make sure your frontend's There are trade-offs between using Hono (middleware, helpers, but more abstraction and overhead) and using orpc standalone (minimal, faster, but you handle things like cookies yourself) [discussion]. You can look at the Next.js playground in the orpc repo for patterns on API handler setup, and there's a basic Vercel config for clean URLs [vercel config PR], but nothing Hono-specific. If you share the specific errors you're seeing, I can help troubleshoot more directly. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
I need more information to help troubleshoot this issue. Could you provide:
A minimal reproduction example would also be very helpful if possible. |
Beta Was this translation helpful? Give feedback.
Got it working
had to set the basepath
const app = new Hono().basePath("/api");
Change
prefix: "/api/rpc",
add
output
to `vercel.json."outputDirectory": "./dist",