Skip to content
This repository was archived by the owner on May 11, 2026. It is now read-only.

fix CI: upgrade Node.js from 17 to 20#60

Closed
AmSach wants to merge 3 commits into
radiantly:mainfrom
AmSach:fix/node-version-workflow
Closed

fix CI: upgrade Node.js from 17 to 20#60
AmSach wants to merge 3 commits into
radiantly:mainfrom
AmSach:fix/node-version-workflow

Conversation

@AmSach

@AmSach AmSach commented May 7, 2026

Copy link
Copy Markdown

Summary

Upgrade Node.js version in GitHub Actions from 17 to 20.

Problem

pnpm latest requires Node.js >= 18.12 but the workflow was using Node 17, causing CI failures:

ERROR: This version of pnpm requires at least Node.js v18.12
The current version of Node.js is v17.9.1

Solution

Update node-version from "17" to "20" in the setup-node action.

Testing

CI should pass after this change.

AmSach added 3 commits May 7, 2026 01:11
- Changed .catch(() => {}) to .catch(err => console.error(...))
- Now logs the error message instead of silently swallowing it
Signed-off-by: Aman Sachan <amansachan92905@gmail.com>
Signed-off-by: Aman Sachan <amansachan92905@gmail.com>
@AmSach

AmSach commented May 10, 2026

Copy link
Copy Markdown
Author

The CI is failing because the workflow uses Node.js 17 but pnpm 11+ requires Node.js v22+. Here's the fix for .github/workflows/test.yml:

name: Check formatting
on:
  push:
  pull_request:

jobs:
  check:
    name: Check code formatting and run tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: "20"
      - uses: pnpm/action-setup@v4
        with:
          version: latest
          run_install: true
      - name: Check formatting
        run: pnpm run check-formatting

Key changes:

  • node-version: "17""20" (pnpm 11 requires Node 22+, so Node 20 is the minimum stable choice)
  • actions/checkout@v2v4
  • actions/setup-node@v2v4
  • pnpm/action-setup@v2v4

@AmSach

AmSach commented May 10, 2026

Copy link
Copy Markdown
Author

Correction: the CI failure shows pnpm 11 requires Node.js v22.13, not v18.12. Node 20 alone won't work.

The fix needs either:

  1. Node 22+: Set node-version: "22" (or "23"), OR
  2. Pin pnpm to v9: Set version: "9" in pnpm/action-setup@v4 (pnpm v9 works with Node 20)

Option 1 is cleaner since Node 22 is LTS and future-proof.

@radiantly

Copy link
Copy Markdown
Owner

See #59 (comment)

@radiantly radiantly closed this May 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants