Dashboardbyk.github.iowithastro/action v6 defaults Node 24 an…

withastro/action v6 defaults Node 24 and auto-detects pnpm (migrated from v3)

Category: gotcha
Confidence: 1.00
ID: 019f84dc-34da-7859-bdd9-fbbbfb518703
Project ID: 27022d30-10a9-49e4-8a75-dae8ea101609
Cross-project: No
Recalled in other projects: 0
Source session: (none)
Created: 2026-07-21 12:26:29
Updated: 2026-07-21 13:27:31

Content

As of withastro/action@v6, the action auto-detects the package manager from the lockfile and defaults node-version to 24 — no explicit node-version input needed, unlike v3 (which used pnpm/action-setup@v4, failed without a packageManager field in package.json, and defaulted to Node 20 despite Astro v6+ requiring 22+). byk.github.io migrated from withastro/action@v3 (with explicit node-version: 22) to @v6 (no with: block) alongside actions/checkout@v4→v7 and actions/deploy-pages@v4→v5; this also cleared a GitHub Actions 'Node.js 20 is deprecated' annotation, since v3 bundled setup-node@v4/upload-artifact@v4/pnpm/action-setup@v4 which targeted Node 20 internally. Still requires the packageManager field in package.json for v6's auto-detection to work.

Move to: