Skip to content

[BUG] npm adduser fails in workspace. #4404

@louis-bompart

Description

@louis-bompart

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.

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 1high priority issueRelease 8.xwork is associated with a specific npm 8 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions