npm icon indicating copy to clipboard operation
npm copied to clipboard

npm publish sometimes fails

Open David-Kozina-SA opened this issue 3 years ago • 5 comments

We have set up semantic release for private package registry. It works fine most often but in rare instances the publish fails, leaving package unpublished but it create a tag.

If we add a minor fix and run the gitlab-ci again, it passed every time we had to do that. So the problem does not seem to be with an authentication or some bad address. Maybe problem with internet connection?

This part of job run should be relevant. The error message does not make any sense for me:

...
npm notice 
npm ERR! code E404
npm ERR! 404 Not Found - PUT https://our-gitlab-server/api/v4/projects/0/packages/npm/@web%2ficons
npm ERR! 404 
npm ERR! 404  '@web/[email protected]' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-04-07T13_48_16_181Z-debug.log
[1:48:16 PM] [semantic-release] › ✖  Failed step "publish" of plugin "@semantic-release/npm"
[1:48:16 PM] [semantic-release] › ✖  An error occurred while running semantic-release: Error: Command failed with exit code 1: npm publish /builds/web/ui-lib-icons --userconfig /tmp/26eb03db412bbdd2de812d931e3ac586/.npmrc --tag latest --registry https://our-gitlab-server/api/v4/projects/0/packages/npm/
...

(I edited the address of our gitlab server for our company privacy)

It also seems to occur only when the package version ends with a 0, but it sometimes pass with 0 too.

I would be glad if you can investigate why this is happening or point me in the right direction. I am unable to find out what can cause this problem.

(Edit) we use version 7.0.10

David-Kozina-SA avatar Apr 08 '21 08:04 David-Kozina-SA

Also hitting this issue with exact same error. (Oddly, also trying to publish v1.2.0)

wcpines avatar May 07 '21 20:05 wcpines

I have the same problem : I had it when I was merging into default branch which created a latest tag that was already in the registry. I don't understand why publishing on other dist tags create a latest tag

SimonChaumet avatar Jan 18 '22 09:01 SimonChaumet

Can I Work on this? @David-Kozina-SA ? Please assign me..

Sathvik902 avatar Mar 22 '23 10:03 Sathvik902

Hello @Sathvik902 Please ping someone else as I have nothing to do with the development of semantic-release (I just reported this bug) and in fact I do not have rights to assign anyone. Cheers.

David-Kozina-SA avatar Mar 22 '23 11:03 David-Kozina-SA

@boennemann @gr2m @kbrandwijk, Can I Work on this issue? Kindly assign me..

Sathvik902 avatar Mar 25 '23 10:03 Sathvik902