Skip to content

ci: fix npm publish (pin npm to 11.18.0 — npm 12 breaks provenance/sigstore)#65

Merged
ABB65 merged 1 commit into
mainfrom
ci/fix-npm-publish-sigstore
Jul 9, 2026
Merged

ci: fix npm publish (pin npm to 11.18.0 — npm 12 breaks provenance/sigstore)#65
ABB65 merged 1 commit into
mainfrom
ci/fix-npm-publish-sigstore

Conversation

@ABB65

@ABB65 ABB65 commented Jul 9, 2026

Copy link
Copy Markdown
Member

Why the last release didn't publish

Run 29007036403 passed lint/typecheck/build/test/release-checks but failed on Create release PR or publish with:

npm error code MODULE_NOT_FOUND
npm error Cannot find module 'sigstore'
npm error   .../npm/node_modules/libnpmpublish/lib/provenance.js
...
an error occurred while publishing @contentrain/mcp: MODULE_NOT_FOUND Cannot find module 'sigstore'
packages failed to publish:
  [email protected]  @contentrain/[email protected]  @contentrain/[email protected]
  @contentrain/[email protected]  @contentrain/[email protected]  @contentrain/[email protected]

The version PR had already merged (changesets consumed), so the job took the "publish any unpublished packages" path — and crashed while generating provenance. This is not an auth/OIDC problem; auth succeeded.

Root cause

The job upgraded npm with npm install -g npm@latest, which now resolves to npm 12.0.0. npm 12.0.0 ships libnpmpublish/lib/provenance.js (which require('sigstore')) but does not bundle the sigstore module — so provenance generation dies with Cannot find module 'sigstore'.

Verified by unpacking the tarballs:

npm bundles sigstore?
11.5.1
11.18.0
12.0.0 ❌ (but still ships provenance.js)

@latest jumped past the 11.x line the pipeline was written for (the step comment even says "requires >= 11.5.1").

Fix

Pin [email protected] (latest 11.x — above the 11.5.1 trusted-publishing minimum, sigstore bundled) instead of @latest.

After merge

Release triggers on push to main, so merging this PR re-runs Release and publishes the already-versioned packages listed above. No manual re-tag needed. (Optionally run the workflow via workflow_dispatch if the push trigger is skipped.)

🤖 Generated with Claude Code

…ailure)

The Release job upgraded npm via `npm install -g npm@latest`, which now
resolves to npm 12.0.0. npm 12.0.0 ships libnpmpublish's provenance.js —
which `require('sigstore')` — but does NOT bundle the sigstore module, so
`changeset publish` fails during provenance generation with
"npm error Cannot find module 'sigstore'" and no packages are published
(run 29007036403). Verified by unpacking the tarballs: sigstore is bundled
in npm 11.5.1 and 11.18.0, missing in 12.0.0.

Pin to [email protected] (latest 11.x, >= the 11.5.1 trusted-publishing minimum,
sigstore bundled). Merging this to main re-triggers Release, which publishes
the already-versioned-but-unpublished packages ([email protected], [email protected],
[email protected], [email protected], [email protected], [email protected]).
@netlify

netlify Bot commented Jul 9, 2026

Copy link
Copy Markdown

Deploy Preview for contentrain-ai ready!

Name Link
🔨 Latest commit 279fb9d
🔍 Latest deploy log https://app.netlify.com/projects/contentrain-ai/deploys/6a4f6e3b9e703a0008276655
😎 Deploy Preview https://deploy-preview-65--contentrain-ai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ABB65
ABB65 merged commit f44e02b into main Jul 9, 2026
6 checks passed
@ABB65
ABB65 deleted the ci/fix-npm-publish-sigstore branch July 9, 2026 09:52
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant