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

yarn install in a workspace should not install all workspaces dependencies #7453

Open
bannier opened this issue Jul 31, 2019 · 1 comment
Open

Comments

@bannier
Copy link

bannier commented Jul 31, 2019

Do you want to request a feature or report a bug?
Bug

Current behavior

/package.json

{
  "private": true,
  "workspaces": ["workspace-a", "workspace-b"]
}

/workspace-a/package.json

{
  "name": "workspace-a",
  "version": "1.0.0"
}

/workspace-b/package.json

{
  "name": "workspace-b",
  "version": "1.0.0",
  "dependencies": {
    "cowsay": "^1.4.0"
  }
}

then

cd workspace-a
yarn

installs cowsay in /node_modules

.
├── node_modules
│   ├── cowsay
│   ├── ...
│   ├── workspace-a -> ../workspace-a
│   └── workspace-b -> ../workspace-b
├── package.json
├── workspace-a
│   └── package.json
├── workspace-b
│   ├── node_modules
│   └── package.json
└── yarn.lock

Expected behavior
yarn install in workspace-a should not install cowsay in node_modules since it doesn't belong to workspace-a dependencies

Versions
yarn 1.17.3
node v11.13.0
Ubuntu 18.04.2 LTS

@rigwild
Copy link

rigwild commented May 27, 2020

Bumping this issue up. Seems like it hasn't been noticed.

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

No branches or pull requests

2 participants