ci: drop redundant 'npm install -g npm@latest' (fixes sigstore MODULE_NOT_FOUND on publish)#147
Merged
Merged
Conversation
Now that Node tracks latest LTS (24.x, bundling npm 11.x), this step is not just unnecessary — it is actively breaking the publish. Installing npm@latest over the toolcache npm produces a global install missing its bundled 'sigstore' dependency, so 'npm publish --provenance' crashes: npm error code MODULE_NOT_FOUND npm error Cannot find module 'sigstore' The npm bundled with a current LTS Node already supports provenance with sigstore intact, so publishing with it directly works. Removing the step fixes the publish and eliminates the last moving-version failure point.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Follow-up to #146. With
lts/*in place the EBADENGINE failure is gone (build now runs on Node 24.18.0), but the publish step now fails: run 29104808669.Root cause
The
Update npm for provenance supportstep runsnpm install -g npm@latest, overwriting the toolcache's bundled npm. That npm-over-npm install lands a global npm whosesigstoredependency is missing, sonpm publish --provenanceblows up withMODULE_NOT_FOUNDthe moment it tries to generate the provenance attestation.Fix
Delete the step. The npm bundled with a current LTS Node (npm 11.x on Node 24.18.0) already supports
--provenancewithsigstoreintact, so publishing with the bundled npm just works. This also removes the last moving-version failure point in the workflow — nothing left to drift or self-corrupt.Testing
npm ci→npm run lint→npm run buildpass locally.