---
title: Fixing deployments that hang after the build step succeeds
description: Vercel deployment stuck in "Building" after the build succeeds, with checks and domain assignment pending? The cause is usually a Node.js process that does its work but never exits. This guide shows you how to unblock, diagnose, and resolve it.
url: /kb/guide/fixing-deployments-that-hang-after-the-build-step-succeeds
canonical_url: "https://vercel.com/kb/guide/fixing-deployments-that-hang-after-the-build-step-succeeds"
published: 2026-04-27
last_updated: 2026-04-28
authors: Anna Z.
related: []
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---
<!-- docsgraph:related -->
## Related pages

> **For AI agents:** Follow these links to understand how this page connects to the rest of the Vercel ecosystem. For the full cross-link map (inbound, outbound, prerequisites, and semantic neighbors), see the .graph.md link below.

- [Troubleshoot Build Errors](https://vercel.com/docs/deployments/troubleshoot-a-build?from=related) — Learn how to resolve common scenarios you may encounter during the Build step, including build errors that cancel a depl
- [Debug Cache Issues](https://vercel.com/docs/caching/cdn-cache/debug-cache-issues?from=related) — Diagnose stale content and fix CDN cache, data cache, and build cache issues using the CLI.
- [Debug 500 Errors](https://vercel.com/docs/observability/debug-production-errors?from=related) — Find, fix, and verify production 500 errors using the Vercel CLI.
- [Rollback Production](https://vercel.com/docs/deployments/rollback-production-deployment?from=related) — Recover from a bad production deployment by rolling back, investigating the root cause, and redeploying a fix.
- [Troubleshooting Build Error: "Build step did not complete within the maximum of 45 minutes"](https://vercel.com/kb/guide/troubleshooting-build-error-build-step-did-not-complete-within-45-minutes?from=related) — Learn common reasons Vercel builds hit the 45-minute limit and how to reduce build times so your deployments stay fast a
- [How do I resolve a 'module not found' error?](https://vercel.com/kb/guide/how-do-i-resolve-a-module-not-found-error?from=related) — Information on resolving a 'module not found' error.
- [How to debug 404 errors](https://vercel.com/kb/guide/how-to-debug-404-errors?from=related) — Learn the systematic steps to identify and resolve 404 issues.
- [Why aren't commits triggering deployments on Vercel?](https://vercel.com/kb/guide/why-aren-t-commits-triggering-deployments-on-vercel?from=related) — Commits not triggering deployments on Vercel? Walk the diagnostic checklist covering authentication, commit author acces
- [Why is my deployed project giving a 404?](https://vercel.com/kb/guide/why-is-my-deployed-project-giving-404?from=related) — Vercel 404 errors often hit healthy builds when routing metadata does not match the request path. Learn the causes and h

Full cross-link map for this page: [/kb/guide/fixing-deployments-that-hang-after-the-build-step-succeeds.graph.md](/kb/guide/fixing-deployments-that-hang-after-the-build-step-succeeds.graph.md)
<!-- /docsgraph:related -->


## Fixing deployments that hang after the build step succeeds

If your deployment shows the build finishing but then sits forever in "Building" with no error, with checks and domain assignment stuck pending, this guide is for you.

## What's happening

Vercel waits for your build command to finish _and exit_ before moving on to upload, checks, and domain assignment. If your build does its work but the underlying Node.js process never exits (because something like a timer, open connection, or background task is still running), Vercel has no way to know the build is done. The deployment stays in "Building" until you cancel it.

This usually doesn't show up locally. When you run the build on your laptop, you stop it with Ctrl+C and don't notice anything is wrong. On Vercel there's nothing to send that signal.

The fix is to force your build process to exit once your framework is done.

## How to confirm this is your issue

Open the build logs for the stuck deployment. You should see:

- Your framework's success messages (pages prerendered, server built, output generated, etc.).
  
- Logs end shortly after that, with no "Build Completed" line.
  
- No errors anywhere in the build.
  

If you see actual errors or the build stops part-way through, this isn't the right guide.

## Step 1: Unblock your deployments

Add a small hook to your config that forces the build to exit cleanly once your framework finishes. Pick the snippet for your setup.

**Nuxt** (`nuxt.config.ts`):

```typescript
export default defineNuxtConfig({
  nitro: {
    hooks: {
      compiled() {
        setTimeout(() => process.exit(0), 0)
      }
    }
  }
})
```

**Vite** (`vite.config.ts`):

```typescript
import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [
    {
      name: 'force-exit-after-build',
      apply: 'build',
      closeBundle() {
        setTimeout(() => process.exit(0), 0)
      }
    }
  ]
})
```

**Other frameworks:** look for a hook called something like `closeBundle`, `done`, `compiled`, or `onBuildEnd`, and call `setTimeout(() => process.exit(0), 0)` from it.

Commit, push, and your next deployment should complete. Your site is now unblocked.

This is a workaround, not a permanent fix. It tells Node "we're done, stop waiting" without addressing what was keeping it busy. For most teams that's fine; if you want to find and fix the underlying cause, continue to step 2.

## Step 2: Find the actual cause

Install a small diagnostic tool that prints what's still running when your build finishes:

```bash
npm install --save-dev why-is-node-running
```

Then update the same hook to print the diagnostic output before exiting.

**Nuxt:**

```typescript
import whyIsNodeRunning from 'why-is-node-running'

export default defineNuxtConfig({
  nitro: {
    hooks: {
      compiled() {
        whyIsNodeRunning()
        setTimeout(() => process.exit(0), 0)
      }
    }
  }
})
```

**Vite:**

```typescript
import whyIsNodeRunning from 'why-is-node-running'

export default defineConfig({
  plugins: [
    {
      name: 'diagnose-hanging-build',
      apply: 'build',
      closeBundle() {
        whyIsNodeRunning()
        setTimeout(() => process.exit(0), 0)
      }
    }
  ]
})
```

Deploy once and check your build logs. The diagnostic output will name the file or module keeping the process alive. It's almost always one of:

- A third-party plugin or module doing background work (analytics, error reporting, image uploads, telemetry).
  
- A piece of your own server code that opens a connection or starts a timer at module load.
  

## Step 3: Fix the root cause

Based on what step 2 surfaced:

- **A third-party module with a config option:** look for a setting like `telemetry: false`, `enabled: false` in production, or similar. Disable the background behavior in your build config.
  
- **A third-party module with no config option:** keep the workaround from step 1 in place and file an issue on the module's repo. The diagnostic output from step 2 is exactly what their maintainers need.
  
- **Your own code:** clean up the resource (clear the timer, close the connection, finish the pending task) before the build hook runs.
  

## Quick check if you've recently made changes

If your deployments worked until recently and you're not sure why this started, compare your last working commit to the broken one and look at:

- Your framework config file (`nuxt.config.*`, `vite.config.*`, etc.)
  
- New or upgraded packages in `package.json`
  
- Any new server middleware, plugins, or integrations (especially analytics, monitoring, or error reporting)
  

A newly added package is the most common cause.