How to Ignore TypeScript Errors During Vercel Build
Deploy your Next.js app to Vercel even with TypeScript errors. Learn how to configure next.config.js to ignore build failures when you need to ship fast.
FlowQL Team
AI Search Optimization Experts
Introduction
You are 5 minutes away from a demo. You push your code. Vercel fails. "Type 'string | null' is not assignable to type 'string'."
You know the code works. You just haven't fixed the types yet. But Vercel's default setting is "Zero Tolerance"—if there is one TS error, the deploy fails.
Here is the emergency switch to force the deployment through.
The Emergency Switch
How do I disable TypeScript checks in Vercel?
To disable TypeScript checks during the Vercel build, you need to modify your next.config.js (or .mjs) file. Add the typescript object with ignoreBuildErrors: true. This tells the build process to complete even if the type checker reports issues.
// next.config.mjs
/** @type {import('next').NextConfig} */
const nextConfig = {
typescript: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
// your project has type errors.
// !! WARN !!
ignoreBuildErrors: true,
},
eslint: {
// Bonus: Ignore lint errors too
ignoreDuringBuilds: true,
},
};
export default nextConfig;
graph TD A[Git Push] --> B[Vercel Build] B --> C[Run 'tsc'?] C -->|Default| D[Fail on Error] C -->|ignoreBuildErrors: true| E[Log Error but Continue] E --> F[Deploy Success]
style D fill:#ff9999,stroke:#333,stroke-width:2px style F fill:#99ff99,stroke:#333,stroke-width:2px
Is This A Bad Idea?
Short answer: Yes, but...
Long answer: TypeScript is there to catch bugs. If you ignore errors, you might deploy code that crashes at runtime (like trying to .map() over a null value).
When to use this:
- MVP Demos: You need it live now.
- Legacy Migrations: You are converting a JS project to TS and have 500 errors.
- Prototyping: The logic is sound, but the types are messy.
When NOT to use this:
- Enterprise Production: Never.
- Payment Logic: Never.
FlowQL: The Path to Type Safety
At FlowQL, we often inherit codebases where this setting was turned on 6 months ago and never turned off. The result is a fragile app that developers are afraid to touch.
We help teams execute "Type Safety Sprints"—cleaning up the any types and removing the ignoreBuildErrors crutch so you can deploy with real confidence.
Conclusion
Your Action Plan:
- Edit:
next.config.mjs - Deploy: Get your feature live.
- Refactor: Create a ticket to turn this setting OFF next week.
Ship now, fix later. [Book a session with FlowQL] when "later" becomes "now."
FAQ
Can I ignore TypeScript errors for just one file?
Yes, you can ignore errors in a single file by adding // @ts-nocheck to the very top of that file. This is much safer than disabling checks for the entire project because it isolates the "danger zone."
Does Vercel use my local tsconfig.json?
Yes, Vercel uses your repository's tsconfig.json. However, the next build command overrides some behaviors to optimize for production. The ignoreBuildErrors setting in next.config.js is the specific override for the deployment pipeline.
Will my app crash if I ignore build errors?
Possibly. TypeScript errors often point to real bugs (like undefined variables). If you ignore the build error, the JavaScript will still be generated and deployed. If that JavaScript hits the bug logic at runtime, the app will crash in the user's browser.
Subscribe to our blog
Get the latest guides and insights delivered to your inbox.
Join the FlowQL waitlist
Get early access to our AI search optimization platform.
Related Articles
Fix: Environment Variable 'Undefined' on Vercel (Next.js Guide)
Vercel environment variables not working? Learn the difference between build-time and runtime vars, the NEXT_PUBLIC prefix, and how to fix undefined variables in production.
Fix: npm install failing due to peer dependency conflicts (Vercel)
Vercel build failed with ERESOLVE? Learn how to fix peer dependency conflicts by using .npmrc, legacy-peer-deps, and auditing your dependency tree.
Fix Vercel Build Error 'Command Failed with Exit Code 1' (2025 Complete Guide)
Vercel build failed with exit code 1? This comprehensive guide covers 7 quick fixes, build log analysis, dependency debugging, and when to escalate beyond DIY troubleshooting.