Are you experiencing an issue with...
:beetle: Description
The NPM package version badge for my package @freddyheppell/random-prime is now showing invalid, when it should be showing the latest version 1.2.2
:link: Link to the badge
https://img.shields.io/npm/v/@freddyheppell/random-prime
:bulb: Possible Solution
Seeing the same on mine: https://img.shields.io/npm/v/@tdreyno/leisure
The endpoint we call for these badges is
https://registry.npmjs.org/-/package/@freddyheppell%2Frandom-prime/dist-tags
which is returning a 401 Unauthorized.
We seem to be getting the same result on other packages with scope e.g:
https://registry.npmjs.org/-/package/@cycle%2Fcore/dist-tags
but its working for non-scoped e.g:
https://registry.npmjs.org/-/package/chalk/dist-tags
and other endpoints seem to be working for scoped packages e.g:
https://registry.npmjs.org/-/package/@freddyheppell%2Frandom-prime/collaborators
I think this is probably an issue with the upstream API. Does anyone have a rough idea when this started failing?
(edited by caleb to update link used for version badges)
Seeing same issue here: https://img.shields.io/npm/v/@locus-labs/mol-desktop-zoom-control?color=%231EA7FD&label=npm%20version&style=for-the-badge/@latest
Same problem:
https://img.shields.io/npm/v/@ptkdev/webcomponent-instagram-widget.svg
All - the fact that the issue is occurring on the npm registry API means that it's going to impact every package. Please refrain from the "my package too" types of comments.
Interestingly enough the registry.npm.taobao.org mirror endpoint appears to be working :thinking:
https://registry.npm.taobao.org/-/package/@freddyheppell%2Frandom-prime/dist-tags
Wonder if it's related in any way to https://github.com/npm/cli/issues/1431
Thanks for fixing my original post @calebcartwright
This seems to be more than a transient issue.
NPM can be a bit of a tricky project to report issues on sometimes because many their projects don't have issue trackers anymore and their forum is archived. Fortunately (for given values of "fortunately"), this issue affects the CLI as well so I've raised https://github.com/npm/cli/issues/1439 reporting this on the CLI repo (which does have a public issue tracker). We'll see where that goes.. If you're affected by this bug, track that issue and give it a :+1:
Thanks for digging into this.
I sent a tweet to the product manager for npm: https://twitter.com/paulmelnikow/status/1273316128610230279?s=20
The badge has started working again but nothing official from npm/cli#1439 yet
We believe this to be fixed - please let me know if you're still having problems.
This seems to be sorted so going to go ahead and close. Thank you for the report @freddyheppell and the quick fix @ethomson!
Most helpful comment
We believe this to be fixed - please let me know if you're still having problems.