Repository navigation
fix(release-mcp): write the npm token where pnpm publish reads it - #167
Merged
Merged
Conversation
The first Release MCP dispatch failed at publish with `[E404] 404 Not Found - PUT https://registry.npmjs.org/@devschile%2fchucao-mcp`. Every earlier step passed, so the build and the packed dependency were fine: the token never reached npm and the PUT was rejected. release.yml already documents this shape. `setup-node` writes the token to $NPM_CONFIG_USERCONFIG under $RUNNER_TEMP, but `pnpm publish` runs from packages/chucao-mcp and did not inherit it, so write //registry.npmjs.org/ to $HOME/.npmrc before publishing, as release.yml does. `npm whoami` runs first so a bad token fails with an auth error instead of a confusing 404.
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.
The first Release MCP dispatch (#164) failed at the publish step:
Every earlier step passed — library check, build,
check:bin, tests — so the package and its packed@devschile/chucaodependency were correct. The token simply never reached npm.Cause
release.ymldocuments this exact failure in a comment:setup-nodewrites the token to$NPM_CONFIG_USERCONFIG(under$RUNNER_TEMP), but a publish run from a subdirectory did not pick it up, and npm treated the PUT as anonymous.release.ymlworks because it also writes//registry.npmjs.org/:_authTokento$HOME/.npmrc.release-mcp.ymldid not.Change
$HOME/.npmrcbeforepnpm publish, matchingrelease.yml.npm whoamifirst, so a bad or missing token fails as an auth error instead of a misleading 404.The library
2.13.0released successfully from main and its tarball carries the 42 component readmes and both token files, so once this lands the MCP dispatch should publish.