From 5590befbd585ec13f5c423e5a2ec09342dbdb889 Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 21 Sep 2026 10:11:18 +0100 Subject: [PATCH] ci: publish on Node 24 with a pinned npm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The publish workflow ran on Node 25 and then upgraded the global npm with `npm install -g npm@latest`. Since npm 12 shipped, `@latest` resolves to a release that requires Node `^22.22.2 || ^24.15.0 || >=26.0.0` — Node 25 is excluded — so the upgrade step died with EBADENGINE and publishing was impossible: npm error code EBADENGINE npm error Not compatible with your version of node/npm: npm@12.0.2 npm error Required: {"node":"^22.22.2 || ^24.15.0 || >=26.0.0"} npm error Actual: {"node":"v25.9.0","npm":"11.12.1"} Move to Node 24, an LTS line supported by every npm 11.x and 12.x, and pin the upgrade to `npm@^11.5.1` — a range rather than `@latest`, so the next npm major dropping this Node line cannot silently break publishing again. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_013S4pYSjwUsiZtdtMMpW7bw --- .github/workflows/npmpublish.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 510225e..26a78ed 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -20,13 +20,17 @@ jobs: steps: - uses: actions/setup-node@v7 with: - # OIDC trusted publishing needs npm >= 11.5.1, which requires - # Node >= 20.17.0. setup-node's `20` resolves to the latest - # 20.x, which satisfies that. - node-version: 25 + # OIDC trusted publishing needs npm >= 11.5.1. Node 24 is an LTS + # line that every npm 11.x and 12.x supports; Node 25 is not — + # npm 12 requires ^22.22.2 || ^24.15.0 || >=26.0.0, so on Node 25 + # the upgrade step below died with EBADENGINE and no plugin could + # publish. + node-version: 24 registry-url: https://registry.npmjs.org/ + # Pinned to a range rather than @latest: the next npm major dropping + # this Node line would silently break publishing fleet-wide again. - name: Upgrade npm to >=11.5.1 (required for trusted publishing) - run: npm install -g npm@latest + run: npm install -g npm@^11.5.1 - name: Check out Etherpad core uses: actions/checkout@v7 with: