Skip to content

Regression? Change? Can no longer install a single package without all the other dependencies in package.json #3023

Closed
@dandv

Description

@dandv

Current Behavior:

Running npm install <package> --no-package-lock --production --no-save will still install all other dependencies listed in package.json.

Expected Behavior:

This did not use to be the case with npm 6. NPM 6 would install only the requested package.

Steps To Reproduce:

  1. npm install cheerio # this will install 14 packages in node_modules
  2. rm -rf node_modules package-lock.json
  3. npm install local-iso-dt --no-package-lock --production --no-save

This will output added 15 packages, and node_modules does contain all the cheerio dependencies, instead of just the zero-dependency local-iso-dt module.

Environment:

  • OS: Ubuntu 20.04
  • Node: 14.16.0
  • npm: 7.8.0

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions