Cli: [BUG] npm dist-tags ls fails for scoped packages (when not logged in)

Created on 17 Jun 2020  路  2Comments  路  Source: npm/cli

What / Why

Hello.
If I run npm dist-tags ls for a non-scoped package e.g: npm dist-tags ls chalk this returns a result as expected regardless of whether I am logged in or not. If I'm not logged in and I run with a scoped package e.g: npm dist-tags ls @cycle/core I get

npm ERR! dist-tag ls Couldn't get dist-tag data for Result {
npm ERR! dist-tag ls   type: 'tag',
npm ERR! dist-tag ls   registry: true,
npm ERR! dist-tag ls   where: undefined,
npm ERR! dist-tag ls   raw: '@cycle/core',
npm ERR! dist-tag ls   name: '@cycle/core',
npm ERR! dist-tag ls   escapedName: '@cycle%2fcore',
npm ERR! dist-tag ls   scope: '@cycle',
npm ERR! dist-tag ls   rawSpec: '',
npm ERR! dist-tag ls   saveSpec: null,
npm ERR! dist-tag ls   fetchSpec: 'latest',
npm ERR! dist-tag ls   gitRange: undefined,
npm ERR! dist-tag ls   gitCommittish: undefined,
npm ERR! dist-tag ls   hosted: undefined
npm ERR! dist-tag ls }
npm ERR! code E401
npm ERR! 401 Unauthorized - GET https://registry.npmjs.org/-/package/@cycle%2fcore/dist-tags

If I npm login as any user, then npm dist-tags ls for scoped packages starts working.

When

  • n/a

Where

  • npm public registry

How

Current Behavior

I'm using @cycle/core as an example here, but reproduces with other scoped packages:

$ npm dist-tags ls @cycle/core
npm ERR! dist-tag ls Couldn't get dist-tag data for Result {
npm ERR! dist-tag ls   type: 'tag',
npm ERR! dist-tag ls   registry: true,
npm ERR! dist-tag ls   where: undefined,
npm ERR! dist-tag ls   raw: '@cycle/core',
npm ERR! dist-tag ls   name: '@cycle/core',
npm ERR! dist-tag ls   escapedName: '@cycle%2fcore',
npm ERR! dist-tag ls   scope: '@cycle',
npm ERR! dist-tag ls   rawSpec: '',
npm ERR! dist-tag ls   saveSpec: null,
npm ERR! dist-tag ls   fetchSpec: 'latest',
npm ERR! dist-tag ls   gitRange: undefined,
npm ERR! dist-tag ls   gitCommittish: undefined,
npm ERR! dist-tag ls   hosted: undefined
npm ERR! dist-tag ls }
npm ERR! code E401
npm ERR! 401 Unauthorized - GET https://registry.npmjs.org/-/package/@cycle%2fcore/dist-tags

Steps to Reproduce

npm logout
npm dist-tags ls @cycle/core

Expected Behavior

$ npm dist-tags ls @cycle/core
canary: 7.0.0-rc9
latest: 7.0.0

Who

  • logged-out users

References

  • n/a

Most helpful comment

Hi @chris48s - thanks for letting us know. This appears to be a problem in the registry, not in the CLI. We're investigating. More 馃敎

All 2 comments

Hi @chris48s - thanks for letting us know. This appears to be a problem in the registry, not in the CLI. We're investigating. More 馃敎

We believe this to be fixed - please let me know if you're still having problems.

Was this page helpful?
0 / 5 - 0 ratings