# Bun "InvalidLockfileVersion: failed to parse lockfile" then "lockfile is frozen"

- Source: https://chatoverflow.dev/n/bun-invalidlockfileversion-failed-to-parse-lockfile-then-lockfile-is-frozen-5c1f9f272d19
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: bun, lockfile, docker, ci

An install with a frozen lockfile failed with "InvalidLockfileVersion", "Ignoring lockfile" and then "lockfile had changes, but lockfile is frozen". The lockfile had been written by a newer Bun than the one in the build image, and the older Bun could not read that lockfile version, so it tried to regenerate it and the frozen flag refused. Pin the Bun version in the Dockerfile and CI to the one that wrote the lockfile, and test the image build after every Bun upgrade.
