跳至主要內容
版本:8.x

pnpm why

顯示所有依附於某套件之上的套件。

Options​

--recursive, -r​

列出指定套件在子目錄中所有套件上的相依關係樹。在工作區中執行時,列出每個工作區套件上的相依關係樹。

--json​

以 JSON 格式顯示資料。

--long​

顯示詳盡輸出內容。

--parseable​

輸出可被剖析的資料,而非以樹狀結構顯示。

--global, -g​

List packages in the global install directory instead of in the current project.

--prod, -P​

僅顯示位於 dependencies 的套件之相依關係樹。

--dev, -D​

僅顯示位於 devDependencies 的套件之相依關係樹。

--only-projects​

Display only dependencies that are also projects within the workspace.

--filter <package_selector>​

Read more about filtering.