-
-
Notifications
You must be signed in to change notification settings - Fork 990
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 pnpm install
with --force
flag also installs optionalDependencies
which don't match OS in use
#6133
Comments
Oh, it seems this is by design: https://pnpm.io/cli/install#--force |
I do think it's maybe worth discussing having a different A common workflow when debugging is to make a tiny tweak in node_modules (not necessarily patching), and it'd be useful to be able to get back to a good state without installing all optional dependencies. For example, a workflow like this:
It's cumbersome to make a throwaway patch, and it's breakage-y to install optional deps. Would be great to have a command that is essentially "reset me to a fresh install". |
I think |
Maybe not installing optional dependencies would be the default and I am not sure why it should install optional dependencies by default, as packages with binaries for other platforms did cause problems for me more than once :D |
does
works ? |
can we avoid installing optional from other archs ? |
This issue is pretty well-defined, and some spinoff follow-ups have come in. @sibelius what you're asking for is what this issue is asking for. |
Sorry, meant to edit the title rather than lock! |
pnpm version: 7.28.0
Code to reproduce the issue:
Expected behavior:
Usually, only the versions related to Linux are installed for me on a regular install.
Actual behavior:
pnpm downloads all listed
optionalDependencies
Additional information:
node -v
prints: v18.14.1The text was updated successfully, but these errors were encountered: