Skip to content

Conversation

@jorben
Copy link
Collaborator

@jorben jorben commented Feb 11, 2026

Summary

  • Add --ignore-scripts flag to npm publish in the release workflow to prevent triggering the local publish lifecycle script (scripts/publish.js)
  • The local publish script expects NPM_TOKEN env var, but the workflow sets NODE_AUTH_TOKEN, causing the publish step to fail with "NPM_TOKEN not found"
  • The workflow already handles version setting, dependency adjustment, and building independently, so the lifecycle script is unnecessary in CI

Root Cause

package.json defines "publish": "node scripts/publish.js" as a lifecycle script. When npm publish runs in CI, npm automatically executes this script first. The script checks for process.env.NPM_TOKEN, but the workflow only sets NODE_AUTH_TOKEN (the standard env var for npm registry auth via .npmrc), resulting in the error.

Test Plan

  • Trigger a release workflow and verify npm publish succeeds without the lifecycle script interference
  • Verify local npm run publish still works as expected for local beta publishing

🤖 Generated with Claude Code

jorben and others added 2 commits February 11, 2026 17:23
The `publish` script in package.json (`node scripts/publish.js`) is
designed for local publishing and expects `NPM_TOKEN` env var, but the
workflow sets `NODE_AUTH_TOKEN`. Adding `--ignore-scripts` avoids
triggering the local publish script, since the workflow already handles
version setting, dependency adjustment, and building independently.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jorben jorben merged commit b1ceeec into master Feb 11, 2026
2 checks passed
@jorben jorben deleted the fix/ci-npm-publish-ignore-scripts branch February 11, 2026 16:10
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