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] Workspaces and npm bin #3796

Closed
1 task done
rauschma opened this issue Sep 25, 2021 · 1 comment
Closed
1 task done

[BUG] Workspaces and npm bin #3796

rauschma opened this issue Sep 25, 2021 · 1 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

Comments

@rauschma
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When I use npm workspaces, node_modules is not inside the directory of a workspace, but one level higher.

$ cd /tmp/monorepo/workspace1/ ; npm bin
/tmp/monorepo/workspace1/node_modules/.bin

(This directory does not exist.)

Expected Behavior

$ cd /tmp/monorepo/workspace1/ ; npm bin
/tmp/monorepo/node_modules/.bin

Steps To Reproduce

No response

Environment

  • OS: macOS
  • Node: 16.10.0
  • npm: 7.24.0
@rauschma rauschma 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 Sep 25, 2021
@wraithgar
Copy link
Member

This is working as intended. A workspace will not get a node_modules directory unless it has specific dependencies that can not be hoisted to the root package.

npm bin has also been fixed to show an error if you try to run it from inside the context of a workspace, as that is not a valid command in that context.

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

No branches or pull requests

2 participants