Start Astro Dev
When to Use
Starting the Astro Starlight dev server for the org repo site (.internal).
Prerequisites
- Repository cloned at
ORG_REPO_ROOT .internal/directory exists withpackage.jsonPUBLIC_TYPESENSE_URLandPUBLIC_TYPESENSE_SEARCH_KEYenv vars available (either in.internal/.envor container environment)- Node.js installed
Procedure
-
Check for existing instance. If
astro devis already running on the target port, report it and stop. -
Install dependencies. If
node_modulesis missing, runnpm install(notnpm ci— the lockfile may be out of sync). -
Ensure env vars. Check that
PUBLIC_TYPESENSE_URLandPUBLIC_TYPESENSE_SEARCH_KEYare set. If missing from the environment, create.internal/.envfrom.env.example, filling in values from matching container env vars (TYPESENSE_URL→PUBLIC_TYPESENSE_URL,TYPESENSE_SEARCH_KEY→PUBLIC_TYPESENSE_SEARCH_KEY). -
Start the dev server. Run in background with telemetry disabled and a writable
HOME: -
Wait for readiness. Poll the log until
astro vandready inappear (typically 15–20s), then report the local and network URLs. -
Report warnings only if blocking. Non-blocking warnings (giscus overrides, i18n directory missing, etc.) can be noted but do not indicate failure.
Rules
- Default port is
4321(setASTRO_DEV_PORTto override). - Always disable telemetry (
ASTRO_TELEMETRY_DISABLED=1) to avoidEACCESerrors on/home/nextjs/.config/astro. - If
HOMEis not writable, setHOME=/tmp/nextjs-homebefore launching. - The
npm run devscript runsnpm run generatefirst, which regenerates view pages — this is expected and required.