Yesterday's build still exists
Next.js or React Site Down After a Deploy: Roll Back First, Debug Second
It built fine yesterday. Nobody touched it, or so everyone swears, and now the production domain shows an error and the build log reads like a ransom note. Here is the calm part: on a modern host, the version that worked is usually still there, waiting to be pointed at again.
November 19, 2026 · 10 min read
- 11:02 production deploy from main, commit 4f2c9a1
- 11:09 booking pages return 500; home page still loads
- 11:14 platform status page: all systems operational
- 11:17 instant rollback to the 10:31 deployment
- 11:22 test booking, contact form, phone link, login: pass
- 12:48 cause: renamed env var missing in production settings
- 13:30 git revert, local build passes, new deploy promoted
The short answer
When a Next.js or React site breaks after a deploy, restore the last good build first and investigate second. On Vercel, Instant Rollback switches your domains to a build that worked. It does not undo database changes, and it pauses automatic promotion of new pushes until you promote one. Then read the build log, check environment variables and fix the change in code.
On this page
- Four ways a JavaScript site goes dark
- The first hour of a bad deploy, in order
- What a rollback puts back, and what it leaves exactly where it is
- Reading a red build log without guessing
- Environment variables, or the setting that only lived on one laptop
- Why the build that worked yesterday fails today
- Bad deploys made worse: five habits to drop
- When to call, and what it costs
Four ways a JavaScript site goes dark
Sites built on Next.js and React fail differently from a WordPress install on shared hosting. There is usually no server to log into and no plugin folder to rename. Instead there is a build, a deployment and a domain pointing at one of them. Each failure below lives in a different place, and knowing which one you have tells you whether a rollback will help at all.
The deploy went live and broke at runtime
The build passed, production switched over, and pages now throw errors or render blank. A rollback is made for exactly this.
The build failed
Vercel's build troubleshooting page says a failed build's error message is reported on the Deployments page. Read that before anything else.
The platform itself is having a bad day
Builds, functions or the CDN are degraded for everyone. Check the provider's status page before blaming your code.
The domain points at a build that is gone
The error names a missing deployment. Our deployment not found walkthrough covers reconnecting the domain.
Vercel's public status page, as read on November 17, 2026, lists components including Builds, Functions, CDN, DNS, Domain Registration and TLS Certificates, and offers email, SMS, Slack and webhook subscriptions. If one of those shows an incident, the right move is to subscribe and wait. A rollback does not repair someone else's data center.
The first hour of a bad deploy, in order
The urge on a broken deploy is to fix forward: find the bug, patch it, push again. That works when the bug is obvious and the person fixing it is calm. In an emergency neither is reliably true. Restore service first, then investigate with the pressure off. These steps assume Vercel, because its rollback is documented in the facts we rely on; the order applies on any host that keeps old builds.
- 1
Check the platform status page
If the provider reports an incident on builds, functions or the CDN, note it, subscribe and stop. Your code may be fine.
- 2
Line up the time it broke with the last deploy
Open the Deployments page. If the site broke minutes after a production deploy, that deploy is the prime suspect. Note its commit and the one before it.
- 3
Roll back to the last good deployment
Under Vercel's Instant Rollback documentation, revised in July 2026, Pro and Enterprise teams may return to any build that once served production, while Hobby accounts get only the one just before, as of November 2026.
- 4
Read the warning on the confirm screen
Vercel shows a reminder about external APIs, databases and CMSes. If this deploy ran a database migration, stop and get help: old code against a changed database can do new damage.
- 5
Test the paths that make money
On the rolled-back site, buy something small, send the contact form to yourself, tap the phone link and sign in. A homepage that loads is not the same as a business that works.
- 6
Fix the cause in code, not in production
Undo the faulty commit with git revert, which the Git documentation describes as adding a new commit that reverses an earlier one. History stays intact. Build locally before pushing.
- 7
Promote deliberately when the fix is ready
After a rollback, new pushes do not go live on their own. Promote the fixed deployment in the dashboard or with the promote command when you have tested it.
What a rollback puts back, and what it leaves exactly where it is
A rollback feels like a time machine. It is closer to a light switch. Vercel describes the switch as instant: the domains simply move to the build you pick. The code goes back. Very little else does, and the gap between those two facts is where second emergencies are born.
| During and after a rollback | Why it matters | |
|---|---|---|
| Your domains | Point back to the selected earlier deployment | Visitors see the old build immediately |
| Environment variables | Edits made in project settings are not applied while the rollback is in place, per Vercel | Fixing a variable mid-rollback will not show up yet |
| New pushes | Auto-assignment of production domains is turned off | Merging a fix does not publish it until you promote |
| Undoing the rollback | Promote a build from the dashboard, or use the vercel promote command | Someone has to remember to do it |
| Database, CMS, external APIs | Not rolled back (our reading of Vercel's confirm-step reminder) | Schema changes and sent emails stay done |

Rolling back the code is instant. Rolling back the consequences is a separate job.
Reading a red build log without guessing
If the build failed, nothing about it is mysterious yet; it is merely unread. Vercel's guide to troubleshooting builds, in its September 2026 revision, puts the error on the Deployments page and suggests running the build on your own machine first, where problems in the code or its packages show up without the platform in the way. We will not quote Next.js error messages here; we did not verify them, and copying half-remembered errors helps nobody.
- Module not found. Vercel calls it an error "that will appear at build time." Usually a file renamed or moved, an import with the wrong capitalization, or a package missing from the dependency list.
- Build canceled for time. Vercel caps a build at 45 minutes, as of November 2026, and cancels the deployment past that. Builds that exceed memory or disk limits are stopped too.
- No logs at all. Vercel lists "An invalid vercel.json configuration was committed" as one cause. Look at the last change to that file.
- Fails on the server, passes on a laptop. The difference is the environment: variables, versions, or data fetched at build time.
Copy the first error, not the last. Build logs cascade, and the line at the bottom is often a consequence of the one near the top. When you send the log to whoever is helping, send all of it.
Environment variables, or the setting that only lived on one laptop
A variable exists in a developer's local file and nowhere else. A payment key was rotated by the provider and nobody updated production. A variable was renamed in code and not in the dashboard. Each produces a build that passes in one place and fails in another, or a site that builds and then breaks the first time it calls an outside service. If the failure names an API, the API integration broken page covers keys and endpoints.
Our practice: compare the variable names the code expects with the names set for production, one by one. Check for typos, a test key where a live key belongs, and values that expired. Then redeploy and test. Remember the rollback quirk in the table above: a variable you change while rolled back will not take effect until a new deployment is promoted.
Why the build that worked yesterday fails today
"Nothing changed" is almost never literally true. Something changed; it just was not your code. These are the usual suspects we check when a commit that built yesterday fails on a rebuild today, roughly in the order we check them.
- A dependency resolved to a newer version because the lockfile was missing or ignored.
- A page that fetches content at build time got an error, an empty response or a timeout from the CMS or API.
- A token used during the build expired or was revoked.
- Someone edited an environment variable in the dashboard, or deleted one that looked unused.
- The project settings changed: a build command, output directory or framework setting.
If the trouble started with a larger release rather than a single deploy, the failed software update page covers releases that touched the database too. If the site is a full application with logins and customer data, read web app down. And if the database itself is the problem, go straight to the database emergency page before running any migration in reverse.
Bad deploys made worse: five habits to drop
- Redeploying the same broken commit and hoping. If it failed twice, it will fail a third time. Read the log.
- Deleting old deployments to tidy up during the outage. Those are your rollback targets, and deleting the one a domain points at is how a deployment not found error is born.
- Force-pushing over the branch history. Revert instead; you want a record of what shipped and when.
- Rolling back code and forgetting the database. If a migration ran, the old build may not understand the new tables.
- Leaving the rollback in place for weeks. Auto-assignment stays off, so every fix your team merges quietly fails to ship.
When to call, and what it costs
Call when the rollback is not available or did not help, when a migration ran, when the build fails and the log means nothing to you, or when the developer who set up the project cannot be reached. We build custom sites on Next.js ourselves, so this is our home ground. Our reply comes the same business day, within the hours listed on the contact page.
Next.js and React repairs are priced from $575, depending on complexity, and you see a written estimate before anyone touches the project. Our emergency pricing guide breaks down the factors, emergency website repair lists the access we need (the hosting team, the repository, the DNS), and the emergency repair overview covers the rest of the section. If the site is down and you are not sure why, start at the website down checklist.
For longer work, see web app development and fixing broken websites; if nobody on your side owns the technical decisions, a fractional CTO can. We are a web studio in San Antonio and have been building for the web since 1999. Browse projects we have shipped or call (210) 346-0848.
Questions owners ask in an emergency
No. Vercel's rollback points your domains at an earlier deployment, and its confirm step reminds you about external APIs, databases and CMSes used by the current or previous deployments. Our reading is that anything written to a database or sent to an outside service stays done. If the bad deploy ran a migration, get help before rolling back.
Something outside the code changed. Common culprits are a dependency that resolved to a newer version, content fetched at build time that came back empty or failed, an expired token, or an edited environment variable. Vercel recommends building locally first, which separates code problems from environment problems quickly.
As of November 2026, Vercel's documentation limits Hobby accounts to the deployment just before the current one; Pro and Enterprise teams can pick any earlier build that served production. If the last good build is older than that on a Hobby plan, a revert in code and a fresh deploy is the route.
Vercel turns off automatic assignment of production domains after a rollback, so new pushes to the production branch do not replace the rolled-back deployment. When your fix is tested, promote the new deployment from the dashboard or with the vercel promote command.
No. A failed build is reported on the Deployments page with an error message. A deployment not found error means the domain points at a build that no longer exists, often after old deployments were deleted or the domain was attached to the wrong project. Our deployment not found walkthrough covers that one.
Often, yes, if you can sign in to the hosting team. Pick the last deployment that worked and use the rollback option, then test checkout, forms and login. Call a developer if a database migration ran, the rollback option is missing, or the old build fails too.
Keep reading
- Undo now, investigate laterSoftware Update Broke Everything? Roll Back First, Then Find Out WhyA release broke production. Roll back to the last good version, check what a rollback cannot undo, then diagnose away from the live site. The first hour.
- Software triageWeb App Down: A Triage Order for Custom Software When the Error Page Is All Your Users Can SeeCustom web application not working? Read the error code, check status pages, roll back the last deploy, read the logs, then the database. In that order.
- The website offerEmergency Website Repair: Who to Call When the Site Is Down, and What Happens After You DoWebsite down and no one to call? A same-business-day reply, fixed WordPress repair prices, from $575 for other platforms, and the checks before we sign off.
- The software offerEmergency Software Repair: Triage, Containment and a Written Root Cause for Broken Custom SoftwareCustom software or a web app broken today? Triage, stop the damage, restore, find the root cause, and a written estimate first. From $575, depending on scope.
- The mobile offerEmergency App Repair: An iOS and Android Developer for Crashes, Store Trouble and Expired CertificatesApp crashing, rejected or pulled from the store? Crash triage, store fixes, certificates and the access we need, from $575 with a written estimate first.
- The first fifteen minutesWebsite Down? The First 15 Minutes, Before Anyone Touches AnythingYour website is down. Check it from outside, rule out renewals and DNS, read the error code, and skip the moves that turn a short outage into a long one.
- Everything in Emergency RepairSee the section
From the Insights desk
- The Optimizely Hack Was Not an Outage. It Was a Delivery.On November 16, a flaw in Optimizely's sign-up flow let an attacker slip card skimmers, wallet swappers and iPhone exploits into the testing scripts of 178 organizations, the BBC and Zoom among them. How it happened, what it did, and the fixes, in order.
- Why Your WordPress Form Gets Spammed — and the Fix That Doesn't Annoy Real CustomersForm spam isn't the problem — it's what the spam does: buried leads, a poisoned CRM, and an inbox you've learned to ignore. Why CAPTCHAs make it worse, and the silent fix that stops bots without costing you real customers.
Send us the deploy that broke it
Tell us the host, when the site broke and what the build log says. We reply the same business day with the first move and a written estimate.
Which of these sounds like you? (pick any)
Rather talk now? Call (210) 346-0848.