温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/docs/pm/cli/why
点击访问原文链接
bun why - BunDocumentation Index

Fetch the complete documentation index at: /docs/llms.txt

Use this file to discover all available pages before exploring further.

Skip to main contentBun home pageSearch...⌘KInstall BunSearch...NavigationPublishing & Analysisbun whyRuntimePackage ManagerBundlerTest RunnerGuidesReferenceBlogFeedback:first-child]:!hidden peer-[.is-custom]:[&>:first-child]:sm:!hidden peer-[.is-custom]:[&>:first-child]:md:!hidden peer-[.is-custom]:[&>:first-child]:lg:!hidden peer-[.is-custom]:[&>:first-child]:xl:!hidden">Core Commandsbun installbun addbun removebun updatebunxPublishing & Analysisbun publishbun outdatedbun whybun auditbun infoWorkspace ManagementWorkspacesCatalogsbun linkbun pmAdvanced Configurationbun patchbun --filterGlobal cacheGlobal virtual storeIsolated installsLockfileLifecycle scriptsScopes and registriesOverrides and resolutionsSecurity Scanner API.npmrc supportOn this pageUsageArgumentsOptionsExamplesUnderstanding the OutputPublishing & Analysisbun whyCopy pagespan]:line-clamp-1 overflow-hidden group flex items-center py-0.5 gap-1 text-sm text-gray-950/50 dark:text-white/50 group-hover:text-gray-950/70 dark:group-hover:text-white/70 rounded-none rounded-r-xl border px-3 border-gray-200 aspect-square dark:border-white/[0.07] bg-background-light dark:bg-background-dark hover:bg-gray-600/5 dark:hover:bg-gray-200/5" aria-label="More actions" type="button" id="radix-_R_n4ctdbsnlht5lebsnpfdb_" aria-haspopup="menu" aria-expanded="false" data-state="closed">*]:[overflow-wrap:anywhere]">

Explain why a package is installed

Copy pagespan]:line-clamp-1 overflow-hidden group flex items-center py-0.5 gap-1 text-sm text-gray-950/50 dark:text-white/50 group-hover:text-gray-950/70 dark:group-hover:text-white/70 rounded-none rounded-r-xl border px-3 border-gray-200 aspect-square dark:border-white/[0.07] bg-background-light dark:bg-background-dark hover:bg-gray-600/5 dark:hover:bg-gray-200/5" aria-label="More actions" type="button" id="radix-_R_1cctdbsnlht5lebsnpfdb_" aria-haspopup="menu" aria-expanded="false" data-state="closed">The bun why command explains why a package is installed in your project by showing the dependency chain that led to its installation. ​Usage terminal
bun why package>
​Arguments : The name of the package to explain. Supports glob patterns like @org/* or *-lodash. ​Options --top: Show only the top-level dependencies instead of the complete dependency tree. --depth : Maximum depth of the dependency tree to display. ​Examples Check why a specific package is installed: terminal
bun why react
react@18.2.0
└─ my-app@1.0.0 (requires ^18.0.0)
Check why all packages with a specific pattern are installed: terminal
bun why "@types/*"
@types/react@18.2.15
└─ dev my-app@1.0.0 (requires ^18.0.0)

@types/react-dom@18.2.7
└─ dev my-app@1.0.0 (requires ^18.0.0)
Show only top-level dependencies: terminal
bun why express --top
express@4.18.2
└─ my-app@1.0.0 (requires ^4.18.2)
Limit the dependency tree depth: terminal
bun why express --depth 2
express@4.18.2
└─ express-pollyfill@1.20.1 (requires ^4.18.2)
└─ body-parser@1.20.1 (requires ^1.20.1)
└─ accepts@1.3.8 (requires ^1.3.8)
└─ (deeper dependencies hidden)
​Understanding the Output The output shows: The package name and version being queried The dependency chain that led to its installation The type of dependency (dev, peer, optional, or production) The version requirement specified in each package’s dependencies For nested dependencies, the command shows the complete dependency tree by default, with indentation indicating the relationship hierarchy.

Was this page helpful?

YesNoSuggest editsRaise issuebun outdatedPreviousbun auditNext⌘IxgithubdiscordyoutubePowered byThis documentation is built and hosted on Mintlify, a developer documentation platform

bun why - Bun,AI智能索引,全网链接索引,智能导航,网页索引

    Explain why a package is installed