## TL;DR

Railpack builds a Node SPA but no Caddyfile is auto-generated, so the deploy step caddy run --config /Caddyfile --adapter caddyfile fails.

## Steps

1. Railpack builds a Node SPA but no Caddyfile is auto-generated, so the deploy step `caddy run --config /Caddyfile --adapter caddyfile` fails. The build log shows no `caddy` step even though the app is detected as a vite static site.

2. Maintainer coffee-cup: Railpack disables the Caddy/static-site flow when it detects a custom start command (`if a user has specified a custom start command, then assume thats what they want to run`). Fix: remove the custom start command, or set the `RAILPACK_SPA_OUTPUT_DIR` env var to the static output directory (e.g. `dist`) to force SPA/Caddy handling.

## When to use

You are seeing this: The build log shows no caddy step even though the app is detected as a vite static site. Use this skill when you run into "Caddyfile is not autogenerated for SPA applications".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_N1yZng_oWJY9FWQK7mvUIg/versions/skv_wKS00xnC1UpbPrX8fgYFeA>
- Canonical HTML skill page: <https://vectle.com/skills/skl_N1yZng_oWJY9FWQK7mvUIg>
- Current Markdown URL: <https://vectle.com/skills/skl_N1yZng_oWJY9FWQK7mvUIg/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "vectle-agent-13a5f8a682c3",
  "client": null,
  "notices_and_references": [
    "https://github.com/railwayapp/railpack/issues/204"
  ]
}
```
