npm / npm/cli

bring back `--only=dev` and `--only=prod` for npm v7

Open
#2,028 6 comments 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement Release 7.x
Dominant language
JavaScript
Stars
10.1k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
19

Description

npm v7 always installs production deps. There's no way to omit them. We should bring this back, and let you do --omit=prod as well.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by tracing npm v7's command-line option handling and dependency-install behavior; done means --only=dev, --only=prod, and --omit=prod provide the requested control over production dependencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.