-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Running yarn add inside a workspace with pnp enabled installs all node_modules #6614
Comments
It also happens via |
seems the workspace {
"installConfig": {
"pnp": true
}
} which i assume is a bug, i assume it's supposed to inherit from the root |
@KwanMan I do have this on the workspace root, it was added when I ran |
Yea I had to add it to any sub-package I wanted to run |
Good to know there is a workaround, but I'd expect that it understand that it's in a pnp-enabled repo, like it can understand when it's in a workspace and install the dependencies in the parent. |
I stumbled upon this bug because I was searching whether it's possible to have a monorepo with PnP enabled in some of the workspaces, but not in others. Seems that thanks to this "bug" it is? In that case for me it's a feature, though I admit it might be a confusing one. In any case, I thought I'd mention this, because if this gets fixed, it would be nice if there's an official way to enable PnP is some workspaces only. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
I have a project with a workspace (around 10 packages) When I run
yarn add
inside one of the workspaces, it installs allnode_modules
even though I enabled PNP on the root packageIf the current behavior is a bug, please provide the steps to reproduce.
yarn --pnp
on the rootyarn add -D jest-pnp-resolver jest-resolve
What is the expected behavior?
Step 5 should be that it installed the package, but no
node_modules
should be presentPlease mention your node.js, yarn and operating system version.
MacOS 10.14
Node 10.13.0
Yarn 1.12.1
The text was updated successfully, but these errors were encountered: