File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,8 +132,16 @@ jobs:
132132
133133 # Trusted publishing requires npm >=11.5.1 for OIDC token exchange.
134134 # Pin to ^11.5.1 so we don't silently get an older 11.x that lacks OIDC.
135+ #
136+ # Bootstrap via `npx` rather than `npm install -g npm@...` — the latter
137+ # hits a long-standing npm self-upgrade bug on self-hosted runners where
138+ # mid-reify npm unlinks its own `promise-retry` dep and dies with
139+ # MODULE_NOT_FOUND. Using a fresh npx-fetched npm to install itself
140+ # globally sidesteps the half-upgraded state entirely.
135141 - name : Upgrade npm for trusted publishing
136- run : npm install -g npm@^11.5.1 && npm --version
142+ run : |
143+ npx --yes npm@^11.5.1 install -g --force npm@^11.5.1
144+ npm --version
137145
138146 - uses : hyperlight-dev/ci-setup-workflow@v1.9.0
139147 with :
You can’t perform that action at this time.
0 commit comments