oven-sh/bun · error · Error
InvalidBinCount
Error message
InvalidBinCount
What it means
Sentinel variant of the install Error enum: while validating a package's bin/executables section in the lockfile or package metadata, the recorded number of bin entries is inconsistent with the data (e.g. count exceeds available entries). Sibling of InvalidBinContent, which covers malformed entry contents.
Solutions
- Regenerate bun.lock
- Fix conflicting/duplicate bin entries in the package's package.json
- Report lockfile validation bugs to Bun's issues
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/install/error.rs:211 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16).
Data as JSON: /api/errors/217bd4ad8874ad01.
Report an issue: GitHub.
Appendix: source
Thrown at src/install/error.rs:211
#[error("Lockfile validation failed: invalid resolution tag")]
LockfileValidationFailedInvalidResolutionTag,
#[error("Lockfile validation failed: invalid package meta")]
LockfileValidationFailedInvalidPackageMeta,
#[error("Lockfile validation failed: invalid bin tag")]
LockfileValidationFailedInvalidBinTag,
#[error("Lockfile validation failed: invalid package scripts")]
LockfileValidationFailedInvalidPackageScripts,
#[error("InvalidNPMLockfile")]
InvalidNPMLockfile,
#[error("NotSupported")]
NotSupported,
#[error("Unexpected")]
Unexpected,
#[error("NotSameFileSystem")]
NotSameFileSystem,
#[error("FailedToCopyFile")]
FailedToCopyFile,
#[error("InvalidBinCount")]
InvalidBinCount,
#[error("InvalidBinContent")]
InvalidBinContent,
#[error(transparent)]
Sys(#[from] bun_errno::SystemErrno),
#[error(transparent)]
Alloc(#[from] bun_alloc::AllocError),
#[error(transparent)]
Core(#[from] bun_core::Error),
#[error(transparent)]
Resolver(#[from] bun_resolver::Error),
#[error(transparent)]
Spawn(#[from] bun_spawn::Error),
#[error(transparent)]
Http(#[from] bun_http::Error),
#[error(transparent)]
PackageManifest(#[from] crate::PackageManifestError),View on GitHub (pinned to 8c5296ac45)