DEPLOYMENT

Troubleshoot a Static Deployment: Build, Asset, and DNS Errors

Use release logs, browser requests and hostname checks together to find where a static deployment fails and recover safely.

TL;DR: Find the first failed stage. Source or dependency problems happen before a ready artifact exists. A blank site usually needs a browser asset check. A hostname failure needs DNS and TLS checks before a code change.

Introduction

To troubleshoot a static deployment, follow the release from source toward the browser. An npm error, a public 404 and a certificate warning are different signals. Restarting the build every time is slow and may advance a branch in a way that destroys the evidence you need.

Record the site, commit or ZIP name, release ID, public URL and exact symptom. Someone else should be able to reproduce the issue on the same release without guessing what “the latest build” means. That also makes support tickets easier to answer.

What is a deployment failure?

A deployment failure is a point where the intended source does not become the correct public response. Every deployment has at least four stages: retrieve inputs, build and validate files, select a live release, and serve it at a hostname. A failure at one stage does not necessarily undo the others.

For example, your current site can remain live while a new build fails. You may also have a ready artifact which will not publish until hostname readiness checks pass. Distinguish build completion from edge delivery before deciding whether to rebuild, reconfigure DNS, or restore an older version.

Why the first useful error matters

  • Later messages can be consequences of a missing file or failed dependency install.
  • A browser error often refers to the requested URL rather than the relevant source line.
  • A failure that happens on direct route refresh but not an internal navigation points to routing rather than compilation.
  • A second attempt with a moving Git branch can produce a different commit and mask what originally failed.

How to isolate a failed stage

Start with the source and build log

Locate the request that queued the build. If the project uses npm, compare the configured working directory, lockfile and named script with the repository at that commit. The KairoBase isolated runner installs public, locked dependencies and runs the build without network access. If your script expects to fetch remote content or execute during dependency installation, prebuild the site in your own controlled environment and upload the output ZIP.

Inspect the artifact and response

A usable static output begins with a valid index.html at the output root. Inspect the artifact for every script and asset requested by the homepage. Look at status and content type. An HTML document returned to a JavaScript module request can indicate an overbroad SPA fallback. A missing referenced directory may indicate the wrong build target or Vite base setting.

Compare hostnames, then choose a recovery

Open the default and custom hostnames separately. If the default works and the custom one does not, check the custom DNS and TLS mapping. If the current production release is breaking an important task, redeploy a retained version when available. Keeping the old version live while using a draft release to diagnose is safer than replacing it with each experiment.

SignalStart hereNext useful action
npm cannot find a scriptSource package.jsonMatch the configured script and lockfile
Route refresh returns 404Release routing settingsAdd a generated route or enable SPA mode
Styles fail publiclyBrowser Network tabCompare asset path, case and response type
Browser shows certificate warningDomain statusVerify the intended hostname and certificate

Practical steps

  1. Capture the symptom and reproduce using the exact URL and a private browser tab.
  2. Find the corresponding release and build result. Inspect earlier failed steps before changing settings.
  3. Validate output and compare it with the public HTTP responses. Change only the setting or source that explains the evidence.
  4. Verify a recovery release and record what fixed it. Remove sensitive query strings, account data and tokens before sharing logs.

Common mistakes

  • Uploading a new ZIP with the same name but no recorded contents, then assuming it is the same release.
  • Enabling SPA fallback for every public file to try to hide a 404.
  • Sharing full provider logs that contain credentials or customer information.

Frequently asked questions

Why is a deployment ready but not live? It has produced a valid artifact, but a publish action or the hostname checks may still be required.

What does a missing index.html mean? Inspect the selected output directory and look for an extra enclosing folder or a build that generated another format.

How do I tell a DNS problem from a code problem? If HTTPS reaches the expected host and returns your file, DNS did its part. Start with the exact response and path.

Does rollback rebuild the code? KairoBase redeploys the retained artifact. That does not roll back a separate database or API.

What should I send to support? Share release ID, intended URL, observed status and when it happened. Omit passwords and signing values.

Conclusion

Start with the first stage that lacks evidence of success. Use the release documentation, the Vite guide, or MDN’s HTTP response reference depending on what you observed.

Related reading