🔧 Unbreak My AppAll fixesFix KitsSponsor

Fixes › Deploys

Vercel build fails: Type error / ESLint errors (works locally)

Cursorv0Bolt

The error

Failed to compile. Type error: ... / Error: Command "npm run build" exited with 1

Why it happens

next dev doesn't run a full type check, but next build does, and it fails on TypeScript and (in some versions) ESLint errors. Case-sensitive file imports also break on Linux build servers while working on Mac/Windows.

How to fix it

  1. Run npm run build locally to reproduce.
  2. Fix the reported type errors rather than disabling checks.
  3. Check import paths match file names exactly, including case.
  4. Make sure the lockfile is committed and the Node version matches.

Fix prompt (paste into Lovable, Bolt, Cursor, Replit or v0)

My Vercel build fails with the error below but works with npm run dev. Run the production build, fix every TypeScript and lint error properly (no ts-ignore or ignoreBuildErrors), fix any import path whose casing doesn't match the file name, and confirm npm run build passes. Error log: <PASTE LOG>

FAQ

Can I set ignoreBuildErrors?

It ships, but hides real bugs. Use it only as a temporary stopgap.

Why does casing matter?

Vercel builds on Linux, which has a case-sensitive filesystem.

Related fixes

Want the full checklist for this area? Get a Fix Kit ($29)

Get one new fix a week

Free newsletter: the newest breakages in Lovable, Bolt, Cursor, Replit and v0 apps, with paste-in fixes.

We only use your email to send the newsletter. Unsubscribe any time. See privacy.