why
Explain how one package is distributed across the workspace: which projects depend on it, which versions appear, and attributed disk impact per install.
bash
nodehunter why react
nodehunter why react ~/work
nodehunter why lodash ~/work --jsonWhat you get
- Projects that contain the package
- Version list across the workspace
- Per-installation paths and attributed sizes
- Total attributed bytes when installs exist
When no installs match, JSON sets "found": false and omits the explain payload.
Arguments
| Argument | Description |
|---|---|
<package> | Exact package name (required) |
[path] | Scan root (default: current directory) |
Options
Discovery flags, global flags, --top, --full.
Examples
bash
# Why is eslint duplicated?
nodehunter why eslint ~/company
# Compare human summary vs JSON for reporting
nodehunter why webpack ~/legacy --json --json-pretty truefind vs why
| Command | Best for |
|---|---|
find | Locating installs and version spread |
why | Explaining footprint and project linkage |