Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Cannot grant access to package #15667

Closed
jwalton opened this issue Feb 3, 2017 · 8 comments
Closed

Cannot grant access to package #15667

jwalton opened this issue Feb 3, 2017 · 8 comments

Comments

@jwalton
Copy link

jwalton commented Feb 3, 2017

I'm opening this issue because:

  • npm is crashing.

What's going wrong?

According to this:

For example, to grant read-write access the npm-docs package to the @npminc org's wombats team, a user who:

  • is a Super Admin or Team Admin for the Organization

  • has write access to the npm-docs package
    ...would do the following:

    npm access grant read-write npminc:wombats npm-docs
    

I am a Team Admin for the benbria organization. I have write permission to aha. But when I run:

npm access grant read-write benbria:developers aha

I get back:

14:07:38 [jwalton@nimue ~/benbria/aha.js (master)] $ npm access grant read-write benbria:developers aha
npm ERR! Darwin 15.4.0
npm ERR! argv "/Users/jwalton/.nvm/versions/node/v4.2.3/bin/node" "/Users/jwalton/.nvm/versions/node/v4.2.3/bin/npm" "access" "grant" "read-write" "benbria:developers" "aha"
npm ERR! node v4.2.3
npm ERR! npm  v3.10.9
npm ERR! code E401

npm ERR! user cannot modify package : -/team/benbria/developers/package
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jwalton/benbria/aha.js/npm-debug.log

npm-debug.log is here: https://gist.github.com/jwalton/ae43dea66622eb55c7f26fd0c4e04e32

How can the CLI team reproduce the problem?

See above.

supporting information:

  • npm -v prints: 3.10.9
  • node -v prints: v4.2.3
  • npm config get registry prints: https://registry.npmjs.org/
  • Windows, OS X/macOS, or Linux?: OS X
  • Network issues:
    • Geographic location where npm was run: Canada
@jgallen23
Copy link

I am having the same issue. The odd thing is some packages I can grant access to, but some I can't. This is pretty frustrating though, as I paid for Npm for organizations but I can't use them.

@zheoreh
Copy link

zheoreh commented Feb 22, 2017

+1

@legodude17
Copy link
Contributor

I would suggest email support@npmjs.org as well as opening this issue.

@thibaudcolas
Copy link

thibaudcolas commented Mar 23, 2017

Same here with both node 6 / npm 3 and node 7 / npm.

The accounts I'm logged in with are owner of the organisation. The organisation happens to be migrated from an account, not sure if this is relevant.

  • None of the packages available on the historic "organisation" account can be added
  • 2 of the 16 packages of my other account can be added

Edit: this is a "free" org.

Edit: I had changed my npm username a few months ago, made a new account and transferred all packages to it. Logging back into the old account, I can see a bunch of the packages that I can't add from the new one. From this, it looks like write permission on a package isn't enough to add it to a team – you need to be the author of the first published version.

@MathieuAA
Copy link

Hi guys, After some tests, and some painful head-banging, the mentioned "user" is in fact an org "member". You have to be an "admin" (or the owner, but you wouldn't have any problem I guess) to grant access (if someone from NPM would confirm this, that'd be nice).

@MathieuAA
Copy link

@thibaudcolas can you check who you are, with a npm whoami?

@thibaudcolas
Copy link

I contacted the npm support who resolved this for me. They are aware of the issue. The issue is that only users who have "owner scope" of a package can add it to an org, and apparently at the moment "owner scope" = first publish.

@npm-robot
Copy link

We're closing this issue as it has gone seven days without activity and without being labeled. If we haven't even labeled in issue in seven days then we're unlikely to ever read it.

If you are still experiencing the issue that led to you opening this or this is a feature request you're still interested in then we encourage you to open a new issue. If this was a support issue, you may be better served by joining package.communty and asking your question there.

For more information about our new issue aging policies and why we've instituted them please see our blog post.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants