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 adduser fails in workspace. #4404

Closed
2 tasks done
louis-bompart opened this issue Feb 10, 2022 · 5 comments · Fixed by #4479
Closed
2 tasks done

[BUG] npm adduser fails in workspace. #4404

louis-bompart opened this issue Feb 10, 2022 · 5 comments · Fixed by #4479
Assignees
Labels
Bug thing that needs fixing Priority 1 high priority issue Release 8.x work is associated with a specific npm 8 release

Comments

@louis-bompart
Copy link

louis-bompart commented Feb 10, 2022

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

Since 8.5.0, running npm adduser from a workspace fails with ENOWORKSPACES.

Expected Behavior

Running npm adduser from a workspace should be as-if it was run from the top-level directory.

Steps To Reproduce

  1. Scaffold npm workspace project:
mdkir testproject
cd testproject
npm init -y
npm init -y -w ./packages/a
  1. cd into the workspace: cd packages/a
  2. Run npm adduser
  3. See error:
npm ERR! code ENOWORKSPACES
npm ERR! This command does not support workspaces.

Environment

  • npm: npm 8.5.0
  • Node.js: 16.14.0
  • OS Name: Windows 10
  • System Model Name: N.A.
  • npm config: N.A.
@louis-bompart louis-bompart added Bug thing that needs fixing Needs Triage needs review for next steps Release 8.x work is associated with a specific npm 8 release labels Feb 10, 2022
@louis-bompart louis-bompart changed the title [BUG] npm adduser fails in workspace. [BUG] npm adduser fails in workspace. Feb 11, 2022
@fritzy
Copy link
Contributor

fritzy commented Feb 14, 2022

I wonder if this related to the new workspace detection. It's essentially running adduser with the --workspace config item.

@fritzy fritzy added Priority 0 will get attention right away Priority 1 high priority issue and removed Needs Triage needs review for next steps Priority 0 will get attention right away labels Feb 14, 2022
fritzy added a commit that referenced this issue Feb 14, 2022
@fritzy fritzy self-assigned this Feb 14, 2022
@dbouwman
Copy link

I'm running into a similar issue with npm whoami failing with ENOWORKSPACES where as another repo that's using 8.1.2 works just fine.

@fritzy
Copy link
Contributor

fritzy commented Feb 17, 2022

@dbouwman yeah, I have a fix in the works that will cover the appropriate commands

@fritzy
Copy link
Contributor

fritzy commented Mar 2, 2022

This just got merged for this week's release.

@fritzy fritzy closed this as completed Mar 2, 2022
@dbouwman
Copy link

dbouwman commented Mar 2, 2022

@fritzy Thanks! Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Priority 1 high priority issue Release 8.x work is associated with a specific npm 8 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants