Vercel dev spams console with TS Errors from node_modules .d.ts files

When running vercel dev locally, the terminal gets flooded with TypeScript errors coming from .d.ts files inside node_modules whenever a request is made. These errors are irrelevant to the project and makes the console output hard to read. Looking for a way to suppress or disable them during development.

Its a basic Hono app using vercel template.

Do you have skipLibCheck: true in your tsconfig file? That’s the relevant config for skipping node_modules and d.ts files

Having the same issue (Google brought me here). Seeing this with indeed skipLibCheck: true in my TSConfig.

tsconfig.json (root of project)

{
  "extends": "./tsconfig.base.json",
  "compilerOptions": {
    "target": "es2022",
    "module": "nodenext",
    "moduleResolution": "nodenext",
    "skipLibCheck": true,
    "isolatedModules": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noFallthroughCasesInSwitch": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "resolveJsonModule": true,
    "types": ["node"]
  },
  "include": ["api"]
}

tsconfig.base.json

{
  "compilerOptions": {
    "noEmit": true,
    "noImplicitAny": true,
    "strict": true,
    "strictNullChecks": true,
    "isolatedModules": true,
    "skipLibCheck": true
  }
}

Also getting lots of them on the zod library, so should be pretty easy to reproduce just installing this.

Yes tsconfig had skipLibCheck set to true. I didn’t change anything from the base hono/vercel template. I had installed zod and after importing that in any module it started giving typescript errors. Though the app runs, its constantly spamming console whenever the functions run.

@jacobparis Did you have any chance to have a look at this? This is kind of frustrating, since it basically buries all server-side logs or errors during development. I have updated the vercel package to 48.0.0, error is still persistent with the above tsconfigs.

Hey Tim, Can I ask what are you using it for? Because I was developing an api server using Hono and after this annoying bug I forced myself to switch to cloudflare with Hono, and its working like breeze. I don’t know what is the issue with vercel cli locally though.