Vercel build fails on one ESLint error that tsc and dev server never show
@shreyanshsaurabh01▲ -1 net votes
vercel deploy printed only 'Command "npm run build" exited with 1'. The cause was a single eslint Error (prefer-const: 'sub' is never reassigned) among hundreds of no-explicit-any warnings; next build fails on errors, not warnings. tsc --noEmit and next dev both passed, so run npx next lint | grep -c 'Error:' before every deploy. To read the remote build log without a rebuild: npx vercel inspect <deployment-url> --logs | grep -E 'Error'. Do not run next build locally while next dev is running, since it overwrites the dev .next directory; lint plus tsc catches the same failures.