oven-sh/bun · error · Error
Lockfile is missing data
Error message
Lockfile is missing data
What it means
The lockfile parsed but required data sections are absent — expected structures (packages, resolutions) are missing from the document. It fires when deserialization finds the lockfile incomplete, e.g. truncated after hand-editing or a failed write.
Solutions
- Regenerate bun.lock from scratch with `bun install`
- Check that the lockfile was fully written (no interrupted installs left a partial file)
- Restore bun.lock from version control if truncated
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at src/install/error.rs:171 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/7277180853a78ef9.
Report an issue: GitHub.
Appendix: source
Thrown at src/install/error.rs:171
#[error("RepositoryNotFound")]
RepositoryNotFound,
#[error("DebugTextLockfileRoundTrip")]
DebugTextLockfileRoundTrip,
#[error("NoPackage")]
NoPackage,
#[error("BrokenPipe")]
BrokenPipe,
#[error("WriteFailed")]
WriteFailed,
#[error("InvalidCharacter")]
InvalidCharacter,
#[error("InvalidLockfile")]
InvalidLockfile,
#[error("Unexpected lockfile version")]
UnexpectedLockfileVersion,
#[error("Outdated lockfile version")]
OutdatedLockfileVersion,
#[error("Lockfile is missing data")]
LockfileIsMissingData,
#[error("Lockfile is malformed (expected 0 at the end)")]
LockfileIsMalformedExpected0AtTheEnd,
#[error("CorruptLockfile")]
CorruptLockfile,
#[error("Lockfile is missing resolution data")]
LockfileIsMissingResolutionData,
#[error("MissingPackageName")]
MissingPackageName,
#[error("GlobError")]
GlobError,
#[error("Invalid")]
Invalid,
#[error("Lockfile validation failed: list is impossibly long")]
LockfileValidationFailedListIsImpossiblyLong,
#[error("Lockfile validation failed: alignment mismatch")]
LockfileValidationFailedAlignmentMismatch,
#[error("Lockfile validation failed: unexpected number of package fields")]View on GitHub (pinned to 8c5296ac45)