-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[BUG] install --only option not working as intended #2840
Comments
I can confirm this (npm 7.10.0 on debian). After upgrading my current workflow is broken :-( A second use case for me is automatically generated npm modules in my private npm repository. There i have like a hierarchy of device libraries, all depending on each other. During the release cycle I only need the dev dependencies. |
npm v7 looks at all of your dependencies no matter what but will only reify the specific types you specify when using |
Current Behavior:
I have a package.json like,
When I run,
npm install --only dev
It still,dependencies
block.dependencies
block.Expected Behavior:
It should completely ignore the
dependencies
block and only look for, And build dependencies indevDependencies
block.Steps To Reproduce:
package.json
in a folder and run,npm install --only dev
.I get this error,
Environment:
OS: Arch linux
Node: 14.15.4(I have also replicated it with node 15.11)
npm: 7.6.1
The text was updated successfully, but these errors were encountered: