Your app runs fine with npm run dev, but the deploy fails with TypeScript errors

Exact error
error TS6133: 'count' is declared but its value is never read.
Also appears as (2)
  • error TS2322: Type '...' is not assignable to type '...'
  • Type error: ... / Failed to compile (Next.js)
Manually verified CI: pending

We reproduced the error and confirmed the fix on our own test machine on the date shown. Nightly CI re-runs are not running yet. How we verify.

Last verified
Re-test due
Published
Repro
13 files, hashes public
Fix ID
APP-16
Environment and versions
osDebian 13 (container)
node20.19.2
vite8.3.5 (react-ts template, strict, noUnusedLocals)
browserHeadless Chrome 156

In brief

The dev server skips type-checking; the production build doesn't. The full fix shows how to see every error locally in one pass, fix them, and why turning the check off is a trap.

Get the full fix ↓

Symptom

Your Bolt, Lovable or Cursor app works in the preview, or with npm run dev. Then Netlify or Vercel fails the build with lines like:

src/App.tsx(5,10): error TS6133: 'count' is declared but its value is never read.
src/App.tsx(7,20): error TS2322: Type '{ id: string; name: string; }' is not assignable to type 'User'.

Next.js apps show the same thing as Type error: ... and Failed to compile.

Why it happens

  • The dev server only translates your code; it doesn't type-check it. So mistakes the AI left behind don't stop the preview.
  • The production build starts with a strict TypeScript check. In the standard Vite template, npm run build runs tsc -b && vite build.
  • Common leftovers it catches: unused variables, wrong types (a string where a number is expected), and missing properties.

What we could not test

  • Netlify, Vercel or Bolt's deploy pipeline.
  • Next.js's type-check step.
  • Projects with other tsconfig strictness settings.

The full fix

$4

The free part of this page tells you what's wrong. The full fix tells you exactly what to do. It includes:

  • Step-by-step fix, safest option first (the full page is 363 words)
  • 1 copy-paste block of commands, config or code
  • How to check it worked
  • Our test record from Oct 26, 2026: what we ran and what happened

Launching soon. Checkout isn't open yet; prices may change at launch. Join the waitlist. You can check what you'll get: SHA-256 of the full fix ae595970ea3cec27… (how to check).

Sources

  1. r/boltnewbuilders: Netlify builds failing due to TypeScript errors
  2. next.js discussion 24866: local builds succeed but Vercel build fails (Type error)
  3. r/cursor: moving from dev environment to production build

How this page was made

Drafted by an AI agent and reproduced on our test machine on Oct 26, 2026. The scripts and logs are in the repro bundle; their file hashes are public on the repro page. Human review: not yet. No warranty: try fixes on a copy or staging environment first. Machine-readable versions: Markdown · JSON.

Found a mistake or a newer version where this breaks? Tell us.