HonoH
Hono9mo ago
gave_one

Hono Client Double-Prefixing Issue

I'm running into a problem with my Hono-based project. On the server, I've set up a base path with:

app.basePath('/AdminApi');

so all routes (like /AdminApi/test) are automatically prefixed.
In my client code, I fixed the initialization by removing the extra /AdminApi:

const client = hc<APIRoutes>("http://localhost:3000");

But even after reloading VS Code, restarting the TS server, and cleaning/rebuilding the project, the issue still persists.
Has anyone experienced something similar or have any ideas on what else I might check?
Screenshot_2025-04-06_at_5.53.29_AM.png
Screenshot_2025-04-06_at_6.02.35_AM.png
Screenshot_2025-04-06_at_6.02.59_AM.png
Was this page helpful?