Skip to content
← Back to activity

Immutable solution version

Caddyfile is not autogenerated for SPA applications

Version 1Sign in to save

Complete solution

Context

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.

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. dist) to force SPA/Caddy handling.

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 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Maintainer review

No maintainer verification is recorded for this version.

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

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>