changesets/action

Gots 404 error on npm when publishing with GitHub Actions

EduardoJM opened this issue ยท 4 comments

I have a monorepo with some packages and i decided to use turbo to manage the packages and the changesets to make publish a little more easy.

When the changeset publish is run in local repository, the packages are published to npm.

When i added the Github Actions to publish, i got an 404 error on PUT:

๐Ÿฆ‹  info npm info @inventare/icons
๐Ÿฆ‹  info npm info @inventare/react
๐Ÿฆ‹  info npm info @inventare/styles
๐Ÿฆ‹  warn @inventare/icons is not being published because version 0.0.1 is already published on npm
๐Ÿฆ‹  warn @inventare/react is not being published because version 0.0.9 is already published on npm
๐Ÿฆ‹  info @inventare/styles is being published because our local version (0.0.8) has not been published on npm
๐Ÿฆ‹  info Publishing "@inventare/styles" at "0.0.8"
๐Ÿฆ‹  error an error occurred while publishing @inventare/styles: E404 Not Found - PUT https://registry.npmjs.org/@inventare%2fstyles - Not found 

I viewed some other issues with related problems but i don't see any solution.


My repository: https://github.com/inventare/design-system
Complete log of action run: https://github.com/inventare/design-system/actions/runs/5581849500/jobs/10200447919

Same with me.

Complete log of action run: https://github.com/axetroy/iconfont-componentized/actions/runs/5763320547/job/15624927029

๐Ÿฆ‹  info Publishing "@axetroy/iconfont-componentized-cli" at "1.0.5"
๐Ÿฆ‹  info Publishing "@axetroy/iconfont-componentized-gen-react" at "1.0.5"
๐Ÿฆ‹  info Publishing "@axetroy/iconfont-componentized-gen-svg" at "1.0.5"
๐Ÿฆ‹  info Publishing "@axetroy/iconfont-componentized-gen-vue" at "1.0.5"
๐Ÿฆ‹  info Publishing "@axetroy/iconfont-componentized-gen-web-component" at "1.0.5"
๐Ÿฆ‹  info Publishing "@axetroy/iconfont-componentized-parser" at "1.0.5"
๐Ÿฆ‹  info Publishing "@axetroy/iconfont-componentized-share" at "1.0.5"
๐Ÿฆ‹  error an error occurred while publishing @axetroy/iconfont-componentized-gen-svg: E404 Not Found - PUT https://registry.npmjs.org/@axetroy%2ficonfont-componentized-gen-svg - Not found 
๐Ÿฆ‹  error 
๐Ÿฆ‹  error  '@axetroy/iconfont-componentized-gen-svg@1.0.5' is not in this registry.
๐Ÿฆ‹  error 
๐Ÿฆ‹  error Note that you can also install from a
๐Ÿฆ‹  error tarball, folder, http url, or git url.
๐Ÿฆ‹  error npm notice Publishing to https://registry.npmjs.org/ with tag latest and public access
๐Ÿฆ‹  error npm ERR! code E404
๐Ÿฆ‹  error npm ERR! 404 Not Found - PUT https://registry.npmjs.org/@axetroy%2ficonfont-componentized-gen-svg - Not found
๐Ÿฆ‹  error npm ERR! 404 
๐Ÿฆ‹  error npm ERR! 404  '@axetroy/iconfont-componentized-gen-svg@1.0.5' is not in this registry.
๐Ÿฆ‹  error npm ERR! 404 
๐Ÿฆ‹  error npm ERR! 404 Note that you can also install from a
๐Ÿฆ‹  error npm ERR! 404 tarball, folder, http url, or git url.
๐Ÿฆ‹  error 
๐Ÿฆ‹  error npm ERR! A complete log of this run can be found in: /home/runner/.npm/_logs/2023-08-04T14_26_36_018Z-debug-0.log
๐Ÿฆ‹  error 
๐Ÿฆ‹  error an error occurred while publishing @axetroy/iconfont-componentized-gen-vue: E404 Not Found - PUT https://registry.npmjs.org/@axetroy%2ficonfont-componentized-gen-vue - Not found 
๐Ÿฆ‹  error 
๐Ÿฆ‹  error  '@axetroy/iconfont-componentized-gen-vue@1.0.5' is not in this registry.
๐Ÿฆ‹  error 
๐Ÿฆ‹  error Note that you can also install from a

Same with me.

I see new actions running on your repository:

image


Found an solution for this problem?

Solution (for my case):

Add NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} env variable on action:

https://github.com/inventare/design-system/blob/main/.github/workflows/publish-to-npm.yml#L36C11-L36C52

Found an solution for this problem?

sorry, I didn't known how to resolve it. But I know it might be a problem with NPM token or NPM registry. so I tried various methods.

Glad you solved it. :)