跳到主内容
版本:8.x

pnpm why

显示依赖于指定 package的所有 package

注意

If the Dependencies Tree has more than 10 results (end leaves), the output will be truncated to 10 end leaves.

This makes the output more readable and avoids memory issues.

配置项

--recursive, -r

Show the dependency tree for the specified package on every package in subdirectories or on every workspace package when executed inside a workspace.

--json

Show information in JSON format.

--long

Show verbose output.

--parseable

Show parseable output instead of tree view.

--global, -g

列出在全局安装目录的package,而不是在当前项目中。

--prod, -P

Only display the dependency tree for packages in dependencies.

--dev, -D

Only display the dependency tree for packages in devDependencies.

--depth <number>

Display only dependencies within a specific depth.

--only-projects

仅显示同时也在工作区内的依赖项。

--filter <package_selector>

阅读更多有关 filter 的内容。