Deno "lockfile integrity mismatch" in CI
Deno verified a fetched module against deno.lock and the hash did not match. Either a dependency changed without re-locking, or --frozen is set and the imports drifted from the committed lockfile.
What this error means
A run or deno cache fails with "lockfile integrity check failed" or, under --frozen, "lock file out of date". It happens after imports change without the lockfile being regenerated and committed.
error: The lockfile is out of date. Run `deno cache` or use the `--lock-write`
flag to update it.
# or
error: Integrity check failed for https://deno.land/std@0.224.0/mod.tsCommon causes
Imports changed without re-locking
A new or updated import was added but deno.lock was not regenerated, so the recorded hashes no longer match what Deno fetched.
--frozen lockfile in CI with drift
CI runs with a frozen lockfile to guarantee reproducibility. If the committed deno.lock is stale, the frozen check fails instead of silently updating.
How to fix it
Regenerate and commit the lockfile
Update deno.lock locally so it matches your imports, then commit it.
deno cache --lock=deno.lock --lock-write main.ts
git add deno.lock && git commit -m "Update deno.lock"Keep the frozen check in CI
Frozen lockfiles are correct for CI - fix the drift rather than disabling the check.
deno cache --frozen main.tsHow to prevent it
- Commit
deno.lockand regenerate it whenever imports change. - Run
deno cache --frozenin CI to catch drift in PRs. - Pin remote module versions so hashes stay stable.