You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doing npm i --save-dev --save-optional <package> saves the package to optionalDepencies
Expected Behavior
I'd expect some sort of warning or error that the flags are mutually exclusive, or that the format of the flag is indeed --save=main, --save=dev, --save=optional because it seems to be more of an enum than booleans. See also #8188.
Steps To Reproduce
See above.
Environment
npm: v10.9.2
Node.js: v22.14.0
OS Name: Windows 10
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Doing
npm i --save-dev --save-optional <package>
saves the package tooptionalDepencies
Expected Behavior
I'd expect some sort of warning or error that the flags are mutually exclusive, or that the format of the flag is indeed
--save=main
,--save=dev
,--save=optional
because it seems to be more of an enum than booleans. See also #8188.Steps To Reproduce
See above.
Environment
The text was updated successfully, but these errors were encountered: