Hono

H

Hono

This is the official Hono discord server for the community

Join

how to pass a body in the $put requestes ??

i want to pass a json body to a put request but idk how
No description

The response type cannot be obtained using Hono RPC and TanStack Query

I was trying to get the "return success" and "return error", but what I've got is this "type ResponseType = {}" or "type ResponseType = any"
No description

How to implement proxy connections with hono?

I am trying to connect to a proxy network from my hono server but the standard fetch request doesn't allow any proxy arguments. What should I do instead?

Netlify error

I copied the docs exactly from https://hono.dev/docs/getting-started/netlify to clone the netlify template. As soon as I run netlify dev, I get this error. ```bash kiran@KiranMac my-app % netlify dev ◈ Netlify Dev ◈...

Building HonoJS ts app

Hello guys! How do you usually build a hono nodejs app? I have a plain api that I see it is using tsx to run on dev, but it doesn't have any build step. I saw in the docs there is a suggestion of adding a "build" step with tsc but i was curious how other people handle it ...

Strange error

Hi, I'm trying to create something with HonoJS, CloudFlare Workers and D1 (with Prisma). I just want to temporarily lock the user, only I run into this strange problem....

Adding hono to existing node express project

Does anyone have experience using Hono alongside their Node express server? We're trying to use Express middleware to pass requests to our Hono router I keep getting a 404 not found and can't figure out how to pass the Express request properly to Hono ```js const router = express.Router<$Request, $Response>();...

Type Sharing between Nuxt and Hono

We have a Monorepo with a Nuxt 3 frontend and a Hono backend. Now we are unsure on what's the best approach to type our API calls. Our API request look something like this currently ```typescript...

google auth

what does this even do , what is it supposed to be expecting (Required parameters were not found. Please provide them to proceed. i get this error) await googleAuth({ client_id: c.env.GOOGLE_ID, client_secret: c.env.GOOGLE_SECRET,...

POST @hono/zod-validator seems to fail

I have a fairly minimal use-case, in which I'd like to validate that the json posted to an endpoint is correct ala zod. However, it bombs immediately with the following.
{"success":false,"error":{"issues":[{"code":"invalid_type","expected":"string","received":"undefined","path":["source"],"message":"Required"}],"name":"ZodError"}}
{"success":false,"error":{"issues":[{"code":"invalid_type","expected":"string","received":"undefined","path":["source"],"message":"Required"}],"name":"ZodError"}}
...

is the client component `render` method hydration?

Hey I was wondering if the client components render function was actually hydrating the UI. Thanks for the answer!...

"Error: 'c.header is not a function' in Hono setCookie with tRPC Integration"

I'm encountering an error in my Hono and tRPC setup when attempting to set a cookie after user registration. The error message is:
TypeError: c.header is not a function. (In 'c.header("Set-Cookie", cookie, { append: !0 })', 'c.header' is undefined)
TypeError: c.header is not a function. (In 'c.header("Set-Cookie", cookie, { append: !0 })', 'c.header' is undefined)
```...

Module not found '.../index.ts' with Bun

Hi everyone, I just created a fresh hono app and using Bun as a package manager. When I run bun dev it initally works fine until I hit save on the index.ts file then I get an error error: Module not found '<path-of-project>/src/index.ts. The only way I can get it back to run is to restart the process completely... Has anyone encountered this issue and is there any way to fix it?...

getSetCookie is not a function

I've upgraded a Workers project by bumping Hono and Wrangler by a few minor versions. In staging, I'm now seeing:  "TypeError: this[#res].headers.getSetCookie is not a function"  in my streaming logs. This didn't exist before....

any option to have $post ignore json when we provide body via init: {body.. ?

``` const resp = await client.api.scheduling.scheduleExecution.$post( {json: execution}, // this is not used {init:{body: jsonAsString}} );...

any way to have different .notFound depending on parent path ?

I have 2 main path: api dashboard I would like anything path under api/.... that do not exit to return a json object ...

NotFoundHandler TypeScript Error

I am getting a typescript error that I just don't know how to resolve and looking for some help to why I am getting the error. I have created a custom notFound handler function and I am adding it to my app. ts file notFound.ts...
No description

adding generic error output type to App type

Hey all, I am using the typed RPC feature of hono and got it working, except for the errors I have an .onError that consstruct a json from error thrown and I would like that error type to be unioned with each of the output type of all path Is there a way to do this ?...

Hono not matching routes

Hi, I’m using hono as my backend server, however it’s not matching routes… everything gets passed to my notFound handler. ```js import { Hono } from "hono";...

Response loses type when specifying type arguments manually

Hi there! Just started messing around with Hono and was trying to optimize for typesafety. The docs state that adding the path as a generic parameter can help with type inferencing https://hono.dev/docs/guides/rpc#specify-type-arguments-manually so I gave this a shot...
Next