Is there an existing issue for this?
This is a CLI Docs Problem, not another kind of Docs Problem.
Description of Problem
The deprecated --production flag is used when it should likely be --omit=dev in cli/docs/lib/content/commands/npm-install.md here on lines 55-62.
Potential Solution
I suggest using:
--omit=dev instead of the deprecated flag --production, and
--include=dev instead of the --production=false.
This matches the change made for the npm prune documentation in #6987
With the --omit=dev flag (or if the NODE_ENV environment variable is set to production), npm will not install modules listed in devDependencies. To install all modules listed in both dependencies and devDependencies when the NODE_ENV environment variable is set to production, you can use --include=dev.
NOTE: The --omit=dev flag has no particular meaning when adding a dependency to a project.
Affected URL
https://docs.npmjs.com/cli/v11/commands/npm-install
Is there an existing issue for this?
This is a CLI Docs Problem, not another kind of Docs Problem.
Description of Problem
The deprecated
--productionflag is used when it should likely be--omit=devincli/docs/lib/content/commands/npm-install.mdhere on lines 55-62.Potential Solution
I suggest using:
--omit=devinstead of the deprecated flag--production, and--include=devinstead of the--production=false.This matches the change made for the
npm prunedocumentation in #6987Affected URL
https://docs.npmjs.com/cli/v11/commands/npm-install