VisCommandsvis why

vis why

Show why a package is installed (dependency chain)

vis why

Walk the dependency graph backwards to explain how a package ended up in node_modules. Aliased as vis explain for npm-compatibility.

Usage

vis why <packages...> [options]

Examples

vis why react
vis why react --json
vis why react -r            # all workspaces
vis explain react           # npm-compatible alias

Options

OptionAliasDefaultDescription
--jsonfalseOutput as JSON
--longfalseShow extended information (pnpm)
--parseablefalseMachine-readable output (pnpm)
--recursive-rfalseCheck across all workspaces
--dev-DfalseFilter to dev dependencies (pnpm)
--prod-PfalseFilter to production dependencies (pnpm)
--no-optionalfalseExclude optional dependencies (pnpm)
--global-gfalseCheck globally installed packages (pnpm)
--depthLimit dependency tree depth
--filter-FFilter by workspace package name (repeatable)

Deno

Deno has no why command. vis falls back to deno info <module>, which prints a forward dependency graph rather than a reverse "who depends on this" trace — close enough to be useful for tracing, but not an exact equivalent.

Support

Contribute to our work and keep us going

Community is the heart of open source. The success of our packages wouldn't be possible without the incredible contributions of users, testers, and developers who collaborate with us every day.Want to get involved? Here are some tips on how you can make a meaningful impact on our open source projects.

Ready to help us out?

Be sure to check out the package's contribution guidelines first. They'll walk you through the process on how to properly submit an issue or pull request to our repositories.

Submit a pull request

Found something to improve? Fork the repo, make your changes, and open a PR. We review every contribution and provide feedback to help you get merged.

Good first issues

Simple issues suited for people new to open source development, and often a good place to start working on a package.
View good first issues