fix(astro): require Astro 6 peer dep (>=6 <7)#429
Merged
Conversation
The SSR runtime (astro/src/runtime/server.ts) imports astro/app/entrypoint, an Astro-6-only export (Astro 5 exports only ./app and ./app/node). The >=5 <7 peer range therefore caused a cryptic build crash on Astro 5 during "Building server entrypoints": [commonjs--resolver] Missing "./app/entrypoint" specifier in "astro" package The try/catch in getAstroApp() can't help — Vite resolves the specifier at bundle time, before the runtime guard runs. Tighten the peer range to >=6 <7 so it matches what the SSR adapter actually requires (npm warns at install instead of crashing mid-build). Reconcile the lockfile and update the README install note + CHANGELOG. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
@run402/astro's SSR runtime (astro/src/runtime/server.ts) doesawait import("astro/app/entrypoint")— an Astro-6-only export. Registry-confirmed:astro@5.18.2exports only./appand./app/node;./app/entrypointfirst appears in Astro 6.But
peerDependencies.astrowas>=5 <7. A consumer on Astro 5 using the defaultexport default run402()preset (orcreateRun402Adapter()) therefore aborted duringastro build's "Building server entrypoints" step with the opaque:The
try/catchingetAstroApp()doesn't help — Vite resolves the specifier at bundle time, before the runtime guard runs.Fix
Tighten the peer range to
>=6 <7so the declared support matches what the SSR adapter actually requires — npm now warns at install time instead of crashing mid-build.astro/package.json—astro: ">=5 <7"→">=6 <7"package-lock.json— reconciled recorded peer rangeastro/README.md— install note "Astro 5 or 6" → "Astro 6" + runtime/image-only nuanceastro/CHANGELOG.md— dedicated Fixed entry; corrected the now-contradictory "peer range unchanged" line in the @run402/astro: createRun402Adapter incompatible with astro@6 —NoAdapterInstalleddespite registration #403 entryThe build-time image integration (
run402Image()/ the namedrun402alias, used without the SSR adapter) never bundlesruntime/server.tsand still runs on Astro 5, but Astro 5 is now outside the supported peer range.Verification
build:core+build:sdk→tsc --noEmit -p astro✅ →npm test --workspace=astro(285 pass, 0 fail) ✅ →npm run build --workspace=astro✅.Notes
@run402/astrois published (separate, authorized step — not done here).packages/astro/copy + the live run402.com/errors/ page still advising "pin Astro^5") is tracked in kychee-com/run402-private#469.🤖 Generated with Claude Code