Current versus Expected behavior
When running a minimal Hono backend with Zod v4 using vc dev, the CLI fails with multiple TypeScript syntax errors inside Zod’s .d.ts files.
The same code works fine with Zod v3, and also works when run directly with node or ts-node.
Expected:
The dev server should start normally without TypeScript parsing errors.
Actual:
The CLI shows errors when a request occurs, throwing errors like:
node_modules/zod/v4/classic/schemas.d.ts:442:60 - error TS1005: ',' expected.Code, configuration, and steps that reproduce this issue
- Create new project:
mkdir issue && cd issuenpm init -ynpm install hono@4.9.0 zod@4.0.17src/index.ts:
import { Hono } from "hono";import * as z from "zod"; // triggers the errors
const app = new Hono();
app.get("/", (c) => c.text("cesconix"));
export default app;- Run:
vc devNote:
- With Zod v3, no issue occurs.
- With
nodeorts-node, no issue occurs — onlyvc devfails. - Downgrading Zod to v3 is a temporary workaround.
Project information (URL, framework, environment, project settings)
- Node.js: 22.x
- Vercel CLI: 44.7.3
- Framework: Hono 4.9.0
- Zod: 4.0.17