Your app runs fine with npm run dev, but the deploy fails with TypeScript errors
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)
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
- Fix ID
APP-16
Environment and versions
| os | Debian 13 (container) |
|---|---|
| node | 20.19.2 |
| vite | 8.3.5 (react-ts template, strict, noUnusedLocals) |
| browser | Headless 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.
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 buildrunstsc -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
tsconfigstrictness settings.
The full fix
$4The 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
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.