Skip to content

Commit 3d57d8a

Browse files
authored
Merge pull request #9 from sunwjy/fix/npm-self-update
fix(ci): install npm 11 via npx to avoid self-update race
2 parents 9c15d89 + 83a034f commit 3d57d8a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎.github/workflows/release.yml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,13 @@ jobs:
3939
run: pnpm install --frozen-lockfile
4040

4141
# OIDC trusted publishing requires npm >= 11.5.1 (Node 22 bundles npm 10.x).
42+
# Run the installer via npx so the executing npm is not the copy being
43+
# replaced — `npm install -g npm` overwrites its own install dir mid-run
44+
# and dies on lazily-loaded modules (MODULE_NOT_FOUND: promise-retry).
4245
- name: Update npm for trusted publishing
43-
run: npm install -g npm@11
46+
run: |
47+
npx -y npm@11 install -g npm@11
48+
npm --version
4449
4550
- name: Create Release PR or Publish
4651
uses: changesets/action@v1

0 commit comments

Comments
 (0)