LinuxCommandLibrary

npm-explain

shows why a package is installed

TLDR

Explain why package installed

$ npm explain [package-name]
copy
Explain with JSON output
$ npm explain [package-name] --json
copy
Explain specific version
$ npm explain [package@version]
copy

SYNOPSIS

npm explain [package]

DESCRIPTION

npm explain shows why a package is installed. Displays dependency chain.
The command traces dependency tree. Shows all paths to the package.

PARAMETERS

PACKAGE

Package to explain.
--json
JSON output format.
--help
Display help information.

CAVEATS

Alias: npm why. Shows all dependency paths. Requires installed package.

HISTORY

npm explain was added to help understand dependency relationships in complex projects.

SEE ALSO

npm(1), npm-ls(1), npm-why(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community