Cannot `npm access grant` on public package

What I Wanted to Do

Grant read-write access to a public unscoped package to members of an org.

What Happened Instead

npm ERR! Usage: This command is only available for scoped packages.

Reproduction Steps

Run:

npm verbose access grant read-write $ANY_ORG:$ANY_TEAM $ANY_PACKAGE

Details

I think this is a similar issue to NPM 6.6.0 Breaks Access to `ls-collaborators`.
The standardjs team has also run into this problem: https://github.com/standard/standard/issues/1324

Logs while attempting to grant access to members of the browserify org to the common-shakeify package:

npm --loglevel verbose access grant read-write browserify:developers common-shakeify

npm info it worked if it ends with ok
npm verb cli [
npm verb cli   '/usr/bin/node',
npm verb cli   '/sbin/npm',
npm verb cli   '--loglevel',
npm verb cli   'verbose',
npm verb cli   'access',
npm verb cli   'grant',
npm verb cli   'read-write',
npm verb cli   'browserify:developers',
npm verb cli   'common-shakeify'
npm verb cli ]
npm info using npm@6.11.3
npm info using node@v12.10.0
npm verb npm-session 316843ef6366b938
npm ERR!
npm ERR! Usage: This command is only available for scoped packages.
npm ERR!
npm ERR! npm access public [<package>]
npm ERR! npm access restricted [<package>]
npm ERR! npm access grant <read-only|read-write> <scope:team> [<package>]
npm ERR! npm access revoke <scope:team> [<package>]
npm ERR! npm access 2fa-required [<package>]
npm ERR! npm access 2fa-not-required [<package>]
npm ERR! npm access ls-packages [<user>|<scope>|<scope:team>]
npm ERR! npm access ls-collaborators [<package> [<user>]]
npm ERR! npm access edit [<package>]
npm verb exit [ 1, true ]
npm timing npm Completed in 168ms
npm verb code 1

Platform Info

$ npm --versions
{
  npm: '6.11.3',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '35.1',
  http_parser: '2.8.0',
  icu: '64.2',
  llhttp: '1.1.4',
  modules: '72',
  napi: '4',
  nghttp2: '1.39.2',
  node: '12.10.0',
  openssl: '1.1.1c',
  tz: '2019a',
  unicode: '12.1',
  uv: '1.31.0',
  v8: '7.6.303.29-node.16',
  zlib: '1.2.11'
}

$ node -p process.platform
linux

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.