← Back to Library|PromptsFix a Broken Build

Fix a Broken Build

Systematically diagnose and fix build failures by giving the AI your build output, recent changes, and package versions.

5 min|Beginner
BuildQuick WinDeveloper
Prompt Template
My build is failing. Here's what I need you to diagnose:

Build command: [e.g. npm run build, next build]
Full error output:
[paste the complete build output, including warnings]

Recent changes I made before it broke:
[describe what you changed, or paste the git diff]

Package versions:
[paste relevant entries from package.json, or run 'npm ls [package]']

My environment: [Node version, OS, package manager]

Diagnose the root cause. If there are multiple errors, fix them in dependency order (fix the first one first, since later errors might be caused by the first). Show me the minimal change to fix each error."

**Output format:** Root cause explanation + fixes in order.

Build errors cascade, so fixing them in order prevents you from chasing phantom errors. Including your recent changes helps the AI narrow down the cause.

When your build breaks and the error message isn't obvious.

Fix a Broken Build | Library | Modern Vibe Coding