Code
Fix a broken build
Get a Dockerfile, CI job, or bundler building again.
Fill it in
Dockerfile, CI workflow, or build file.
Paste the build output.
Your prompt
Get this build working again. Error: [the error] Read the error properly before changing anything. Build errors bury the real cause in the middle: the first line is usually the last thing that failed rather than the thing that broke. Reproduce it locally on a computer, so you can iterate in seconds instead of guessing at a config and waiting for CI. That single step is most of the speed. Fix the cause. Pinning a version, clearing a cache, or adding a retry are sometimes right and are usually a way of not finding out what happened. If you do reach for one, say why it is the answer rather than the workaround. Confirm with a clean build from scratch, not an incremental one. Half of build fixes only appear to work because something was left over from before.
Use Fix a broken buildOpens with everything above already filled in.
Why this works
A build fixed by changing the thing that errored usually breaks something later. This finds why it broke, then improves the parts that made it fragile.