Skip to content

ci(publish): use npx to run latest npm CLI (avoid global install conflict)#10

Merged
0xkkkn merged 1 commit into
mainfrom
chore/dev-132-publish-fix-npx
May 8, 2026
Merged

ci(publish): use npx to run latest npm CLI (avoid global install conflict)#10
0xkkkn merged 1 commit into
mainfrom
chore/dev-132-publish-fix-npx

Conversation

@0xkkkn

@0xkkkn 0xkkkn commented May 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces npm install -g npm@latest + npm publish with a single npx --yes npm@latest publish .... The previous approach failed because the GitHub-hosted runner already has a system npm wired into pnpm's setup, and npm install -g npm@latest corrupted that install:

npm error code MODULE_NOT_FOUND
npm error Cannot find module 'promise-retry'
npm error - /opt/hostedtoolcache/node/22.22.2/x64/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js
...
##[error]Process completed with exit code 1.

npx --yes npm@latest publish ... fetches a fresh npm CLI into a temp folder for this single invocation, so it doesn't touch the runner's global npm.

Test plan

Linked

@0xkkkn
0xkkkn requested a review from a team as a code owner May 7, 2026 17:59
@0xkkkn
0xkkkn merged commit cb12ec1 into main May 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant