Skip to content

fix: manually configure .npmrc for npm authentication#10

Merged
nastassiafulconis merged 2 commits into
mainfrom
fix-npm-token
Nov 6, 2025
Merged

fix: manually configure .npmrc for npm authentication#10
nastassiafulconis merged 2 commits into
mainfrom
fix-npm-token

Conversation

@nastassiafulconis
Copy link
Copy Markdown
Collaborator

Problem

The release workflow was failing with 404 errors when trying to publish to npm, even though the NPM_TOKEN was configured.

Root Cause

Using setup-node with registry-url and environment variables wasn't properly configuring npm authentication. The token was never being used (npm token showed "Last used: never").

Solution

Manually create .npmrc file with the auth token, matching the pattern from the working type-graphql release workflow.

Changes

  • Removed registry-url from setup-node step (causes conflicts)
  • Added explicit step to create .npmrc with NPM_TOKEN
  • Kept NPM_TOKEN in changesets action env vars

This matches the exact pattern used in the type-graphql manual release workflow that successfully publishes.

Testing

Will be validated when this PR is merged and triggers a release.

- Remove registry-url from setup-node (causes conflicts)
- Add explicit .npmrc configuration step with NPM_TOKEN
- Matches pattern from working type-graphql release workflow
@nastassiafulconis nastassiafulconis requested a review from a team November 6, 2025 16:41
@nastassiafulconis nastassiafulconis enabled auto-merge (squash) November 6, 2025 16:47
Comment thread .changeset/fix-npm-auth.md
Comment thread .github/workflows/release.yml
@nastassiafulconis nastassiafulconis merged commit e92b6d9 into main Nov 6, 2025
6 checks passed
@nastassiafulconis nastassiafulconis deleted the fix-npm-token branch November 6, 2025 16:58
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.

3 participants