Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] npm login/add-user --scope=@myScope do not set the scope on the .npmrc file #3515

Closed
1 task done
NachoAccedo opened this issue Jul 5, 2021 · 3 comments · Fixed by #4060
Closed
1 task done
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release

Comments

@NachoAccedo
Copy link

NachoAccedo commented Jul 5, 2021

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

From https://docs.npmjs.com/cli/v7/commands/npm-adduser

Trying to login on a private artifactory with a defined scope do not set the scope on the ~/.npmrc file, i.e

npm login --scope=@myScope --registry https://myArtifactory

Generated ~/.npmrc

//myArtifactory/:_authToken=**

Expected Behavior

For the npm npm login --scope=@myScope --registry https://myArtifactory
command, we expect the next generated ~/.npmrc file

myScope=https://myArtifactory/
//myArtifactory/:_authToken=**

Steps To Reproduce

npm login --scope=@Myscope --registry https://myArtifactory

Environment

  • OS: OSX 11.4 Big Sur
  • Node: v16.4.1
  • npm: 7.18.1
@NachoAccedo NachoAccedo added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Jul 5, 2021
@apastel
Copy link

apastel commented Jul 28, 2021

Having the same issue as well and I seem to have isolated it down to beginning with npm@7.7.0, regardless of node version. The scope line is added when running npm up to 7.6.3, but then upgrading to 7.7.0 and attempting to login again with a clean ~/.npmrc, the scope line is not added.

@yuqu
Copy link
Contributor

yuqu commented Dec 7, 2021

This is fixed in npm@8.2.0

@nlf
Copy link
Contributor

nlf commented Mar 8, 2022

closing as fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants