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

[BUG] --save-dev and --save-optional are not mutually exclusive #8195

Open
2 tasks done
Sainan opened this issue Mar 30, 2025 · 0 comments
Open
2 tasks done

[BUG] --save-dev and --save-optional are not mutually exclusive #8195

Sainan opened this issue Mar 30, 2025 · 0 comments
Labels
Bug thing that needs fixing Needs Triage needs review for next steps

Comments

@Sainan
Copy link

Sainan commented Mar 30, 2025

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

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
@Sainan Sainan added Bug thing that needs fixing Needs Triage needs review for next steps labels Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps
Projects
None yet
Development

No branches or pull requests

1 participant