Hono

H

Hono

This is the official Hono discord server for the community

Join

hono with better-auth

It should be a pretty straightforward setup, all I'm trying to do here is get the basic authentication working with better auth, I have the schema generated and everything but I keep having issues actually hitting the /api/auth routes. Any idea why this might be an issue? This is my setup:...

swagger-ui and @hono/zod-openapi mismatch

Hello, I'm trying to make the swagger-ui middleware work with the @hono/zod-openapi package. It does work when I run my project but I get this deno-ts error in VS code and I wondered if it was possible to solve it?
app.use("/ui", swaggerUI({ url: "/api/docs" }));
app.use("/ui", swaggerUI({ url: "/api/docs" }));
...

How to debug using TypeScript source files instead of compiled JavaScript?

I'm trying to debug the Hono.js library code while developing my application, but I'm having trouble setting breakpoints in the original TypeScript source files. Currently, when I try to step into Hono's code during debugging, it shows the compiled JavaScript files in node_modules/hono/dist instead of the original TypeScript source files. Can i debug by TypeScript source files?...

hono rpc problem

``` Type 'Hono<Context, BlankSchema | MergeSchemaPath<{ "/signup": { $post: { input: { form: { username: string; password: string; }; }; output: { success: true; message: string; }; outputFormat: "json"; status: ContentfulStatusCode; }; }; } & { ...; } & { ...; } & { ...; }, "/api/auth"> | MergeSchemaPath<...> | MergeSchemaPa...' does not satisfy the constraint 'Hono<any, any, any>'. The types of 'get(...).get(...).getPath' are incompatible between these types. Type 'GetPath<Context>' is not assignable to type 'GetPath<{}>'. Types of parameters 'options' and 'options' are incompatible....

[discord feature req] Make AnswerOverflow forum easier to browse and moderate

Hey team, I’m currently building Paladin. I noticed your forum is synced to the web with AnswerOverflow. Paladin makes forums cleaner, easier to browse, and simpler to moderate directly from the web. It’s completely free to use and can either complement your existing setup or run on its own. If you want, you can try it yourself in a few minutes, or I can spin up a demo and show you how it works, no pressure either way 😀...

File arriving in larger than expected size in multipart/form-data

We have migrated a large express app to hono + @hono/zod-openapi and everything is great except our multipart/form-data file uploads. The route looks like this: ```typescript import { z, createRoute } from '@hono/zod-openapi'...

Many JWT Middlewares OR-ed together

Hi, I have a set of legal JWT keys. I'd like any one of them to allow a request through the middleware. This works: ``` export default function orCombinator<...

Type 'never' has no call signatures. When using client with '$get'

I noticed this type error only happen when i use get or post without body. In all other cases my api client works properly. Any idea how to solve it? Here how my route looks like: ```ts export const getSource = new OpenAPIHono<{ Variables: ContextVariables;...
No description

Using Hono.js on Cloudflare Workers Free Plan with Postgres, JWT, and OAuth

Can honojs work on cloudflare workers free plan with postgres db and hono's built-in JWT and auth with google, github (google and github from hono's list of oauth providers) and custom email auth?

Can not get the Types in route fn

Hi, I am trying to learn this framework. But I am having some difficulty here, and I think you can help me. This way I can get the Types from the valid() fn....

[Vercel] ERR_MODULE_NOT_FOUND on deploy but works locally

Hey everyone 👋 I’m running into an issue when deploying my Hono app to Vercel. Locally, the app builds and runs fine (bun build && bun start works with no errors). But on Vercel, the build passes, then on start I get this error: ```...

Unexpected value of absolutePath(c) when used within a .route()

Hi. Is it expected for route() to reset the basePath context? I am on the latest version of @hono/node-server ("@hono/node-server": "^1.19.0") and stumbled uppon this behavior which I did not expect: ```js const AuthApp = new Hono().basePath("/auth/"); ...

How do I make hono-session work with socket.io

hono-session stores the decrypted cookie in the session section of the context object (c.get("session")) but the context object is not available in socket.io How do I make socket.io work with Hono-session?...

export Context class as value not as type

@yusukebe Hi, I’ve noticed multiple GitHub issues where developers request access to the Context class. This isn’t just a niche use case—many of us need it for testing, extending functionality, or building features that depend on consistent request handling. In my case, I specifically need Context to implement a unified handler for both WebSocket and HTTPS, and while it works, I literally had to download context.ts from the repo just to use it. That feels like a workaround that shouldn’t be necessary. I understand your concern that exposing Context might lead to confusion or unexpected usage. However, many other libraries solve this by making such internals available while clearly stating that they’re unsupported or may change without notice. That way, advanced users can build what they need without being blocked, while beginners remain unaffected. And what if someone raises an issue, just close it or someone from community can help....

TSconfig for bun? Not getting auto imports

I have a monorepo in bun set up with one of the workspaces being a hono application. I'm having trouble getting import suggestions from the typescript language server, but only for subpackages of hono (hono/logger and such). Here are my tsconfigs for the root and for the subproject

Need help with typescript

`import { Hono } from 'hono' import githubApp from './routes/github' const app = new Hono() ...

How to get strict inference with RPC

Here's an example I found online https://x.com/honojs/status/1953608853654057157 In this example, the RPC infers the response as a "string" rather than the literal Hi!. I somewhat got around this by adding as const at the end of { message: "Hi!"} so it looked like { message: "Hi!"} as const but then I couldn't assign variables to the response of that API call because the API calls response is infered as readonly ...

Hono Vite DevServer: Wrangler Workers - Proxy is not initialized

I am trying to setup the Hono vite dev server with the wrangler adapter, for some reason theres a race condition with the wrangler proxy. Here is my config: ```typescript import { defineConfig, type PluginOption } from 'vite'...

How to connect Vite, Hono and Cloudflare Workers?

I am trying to connect Hono with Vite on Cloudflare Workers, everything works, but the wrangler config. for some reason even with the adapter, the wrangler.toml doesn't get picked up and it fails to load environment variables. ```typescript import { defineConfig } from 'vite' import devServer from '@hono/vite-dev-server'...

Vercel errors and noob questions

I am trying to deploy my simple hono app to vercel. I picked the vercel template when I ran the installer. I use better auth and this is the only thing I got in my index.ts right now: ```...
Next