Skip to content

rush why

Terminal window
rush why <package> [flags]

Shows every dependency chain that caused a package to be installed — useful for debugging unexpected packages, resolving version conflicts, or understanding your dependency tree.


FlagDefaultDescription
--depth <n>allMax levels to trace back toward the root
--verbosefalseShow detailed dependency chain information

Show all dependency paths to lodash:

Terminal window
rush why lodash

Show why @types/node is installed:

Terminal window
rush why @types/node

Show only immediate dependents (2 levels up):

Terminal window
rush why axios --depth 2

my-app (dependency)
└── [email protected] (dependency)
└── my-app (dependency)

If a package is pulled in via multiple paths, each path is listed as a separate section.

LabelMeaning
(dependency)Listed in dependencies
(dev)Listed in devDependencies
(optional)Listed in optionalDependencies
peer badgeListed in peerDependencies
[deduped]Already counted in another path