Skip to content

ci: install deps before upgrading npm - #8

Merged
kaufmanhenry merged 1 commit into
mainfrom
fix/publish-install-scripts
Sep 29, 2026
Merged

kaufmanhenry merged 1 commit into
mainfrom
fix/publish-install-scripts

Conversation

@kaufmanhenry

Copy link
Copy Markdown
Owner

Second release attempt failed identically to the first, and Node 22 vs 24 was not the cause.

npm 11 blocks dependency install scripts by default:

npm warn install-scripts 2 packages had install scripts blocked because they are not covered by allowScripts:
  better-sqlite3@11.10.0 (install: prebuild-install || node-gyp rebuild --release)

The workflow ran npm install -g npm@latest before npm ci, so better-sqlite3's prebuild step never ran and npm run fixture died with Could not locate the bindings file. ci.yml passes because it installs with the npm bundled with Node.

Fix is ordering, not configuration: install with the bundled npm exactly as CI does, then upgrade npm immediately before npm publish — the only step that needs 11.5.x for OIDC.

Not using allowScripts: local npm here is 10.9.8 and doesn't know the key, so its syntax can't be verified before pushing, and unverified config changes are how the last two attempts were spent. Worth revisiting when npm 11 becomes the bundled default, because local npm ci will hit the same block then.

The OIDC handshake remains unverified — no run has reached npm publish yet. Re-tagging v2.1.1 onto this is the test.

https://claude.ai/code/session_01LMbjcZogpv9EbVnqovXpSX

Second release attempt failed the same way as the first, and the Node version
was not the cause. npm 11 blocks dependency install scripts unless they are
listed in allowScripts:

  npm warn install-scripts 2 packages had install scripts blocked
    better-sqlite3@11.10.0 (install: prebuild-install || node-gyp rebuild)

Because the workflow ran `npm install -g npm@latest` BEFORE `npm ci`, the
native module was never built and `npm run fixture` died with "Could not
locate the bindings file". ci.yml passes because it installs with the npm
bundled with Node.

Fix is ordering, not configuration: install with the bundled npm exactly as
ci.yml does, then upgrade npm immediately before publish, which is the only
step that needs 11.5.x for OIDC.

Not using allowScripts: local npm here is 10.9.8 and does not know the key, so
the syntax cannot be verified before pushing, and an unverified config change
is how the last two attempts were spent. Worth revisiting when npm 11 ships as
the bundled default, because local `npm ci` will hit the same block then.

The OIDC handshake is still unverified; no run has reached `npm publish` yet.

Claude-Session: https://claude.ai/code/session_01LMbjcZogpv9EbVnqovXpSX
@kaufmanhenry
kaufmanhenry merged commit 5de24b6 into main Sep 29, 2026
3 checks passed
@kaufmanhenry
kaufmanhenry deleted the fix/publish-install-scripts branch September 29, 2026 17:46
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