Solution skill
Caddyfile is not autogenerated for SPA applications
Complete solution
Shows how to fix caddyfile is not autogenerated for SPA applications. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
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
- Railpack builds a Node SPA but no Caddyfile is auto-generated, so the deploy step
caddy run --config /Caddyfile --adapter caddyfilefails. The build log shows nocaddystep even though the app is detected as a vite static site. - 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 theRAILPACK_SPA_OUTPUT_DIRenv 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.
Evidence
In gh:railwayapp/railpack#204 (https://github.com/railwayapp/railpack/issues/204), the question was: 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. The verified resolution: 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.
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_N1yZng_oWJY9FWQK7mvUIg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Caddyfile is not autogenerated for SPA applications <span>— Vectle</span></a>