Skip to content

fix(ci): install Node 24 in docs deploy to satisfy wrangler 4#541

Merged
avihut merged 1 commit into
masterfrom
daft-539/fix-docs-node-version
May 22, 2026
Merged

fix(ci): install Node 24 in docs deploy to satisfy wrangler 4#541
avihut merged 1 commit into
masterfrom
daft-539/fix-docs-node-version

Conversation

@avihut
Copy link
Copy Markdown
Owner

@avihut avihut commented May 22, 2026

Summary

  • Adds actions/setup-node@v5 (Node 24) to .github/workflows/docs.yml before the cloudflare/wrangler-action@v4.0.0 step.
  • Restores the docs deploy after it started failing on the wrangler step with Wrangler requires at least Node.js v22.0.0. You are using v20.20.2.

Root cause

Not the action itself — cloudflare/wrangler-action@v4.0.0 installs wrangler@4 (currently 4.91.0) via bun and verifies it with bun run wrangler --version. That verification shells out to system Node on ubuntu-latest (still 20.20.2). Wrangler 4 recently bumped its floor to Node 22 (Node 20 went EOL April 2026), so the check fails.

The fix is to install a supported Node onto $PATH before the wrangler step. Picked 24 because it's the current Active LTS (EOL April 2028) — 22 would work today but only has ~11 months of support left, so we'd be back here in spring 2027.

Scope: why only docs.yml

Audited every workflow's uses: and run: steps. setup-node only matters when a run: step shells out to a Node-based CLI; GitHub-bundled Node inside actions like actions/checkout or peter-evans/create-pull-request is independent of system Node. docs.yml (via bun → wrangler) is the only workflow currently doing that.

Test plan

  • Merge to master and confirm the Deploy Docs workflow run succeeds end-to-end (push event triggers it via the .github/workflows/docs.yml path filter).
  • Verify the deployed site at https://daft.avihu.dev reflects the latest docs commit.

Fixes #539

🤖 Generated with Claude Code

The Deploy Docs workflow has been failing on `cloudflare/wrangler-action@v4.0.0`
with:

  Wrangler requires at least Node.js v22.0.0. You are using v20.20.2.

The action installs `wrangler@4` via bun and then verifies it with
`bun run wrangler --version`. That verification shells out to system Node,
and wrangler 4 requires Node ≥ 22 — but `ubuntu-latest` still ships Node 20.x
as the default. Adding `actions/setup-node@v5` before the wrangler step pins
the system Node on PATH to the current Active LTS (24, EOL April 2028), which
clears the floor and gives the longest support runway.

No other workflows need the same change: action-bundled Node (from
`actions/checkout`, `peter-evans/create-pull-request`, etc.) is independent of
system Node, and `docs.yml` is the only workflow whose `run:` steps shell out
to a Node-based CLI today.

Fixes #539
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ci): docs deploy fails because wrangler@4 requires Node 22+

1 participant