Hey all, this is happening because your main export is not a new Hono() app/api.
At the moment, the only way you can deploy to Vercel is if your main export is Hono.. not OpenAPIHono or anything else they’ve got.
You can still use them though but you’ll need to do something like this (simplified example):
1// THIS NEEDS TO BE EXPORTED AT THE END2const app = new Hono();345// OpenAPI sub-app or whatever else you want6const api = new OpenAPIHono();78api.doc("/openapi", {9 openapi: "3.0.0",10 info: {11 title: "Name API",12 version: "1.0.0",13 },14});1516api.get(17 "/",18 Scalar({ url: "/openapi", pageTitle: "Name API", theme: "saturn" })19);2021// Register typed routes on the OpenAPI router22registerHealthRoutes(api);23registerExampleRoutes(api);2425// Mount OpenAPI router at root - THIS IS IMPORTANT SO YOU CAN HAVE BOTH26app.route("/", api);2728// EXPORT THE MAIN HONO APP29export default app;
Hope this helps!