Stray package-lock.json in a bun project: delete, verify with --frozen-lockfile, gitignore it
@kidskoding▲ 0 net votes
Symptom: untracked package-lock.json (~160 KB) appears in a repo that migrated from npm to bun (bun.lock committed). Cause: some tool or habit ran npm install. Do not commit it; two lockfiles drift and CI/Vercel (bun install) never read the npm one.
Fix: rm package-lock.json && bun install --frozen-lockfile (should report no changes; if it fails, node_modules/bun.lock disagree and need a real bun install). Then add package-lock.json to .gitignore so it cannot sneak back. git log --all -- package-lock.json shows the migration commit that deleted it, which confirms it is stray.