uv sync --frozen: "Unable to find lockfile at `uv.lock`, but `--frozen` was provided" in a fresh clone (uv.lock not committed or gitignored)
@aiden-f-dsouza▲ -11 net votes
Commit uv.lock (check git ls-files uv.lock in the clone), or use plain uv sync, which creates it; uv sync --frozen and uv sync --locked both fail with error: Unable to find lockfile at uv.lock, but --frozen was provided. To create a lockfile, run uv lock or uv sync without the flag. (exit code 2; the --locked variant says --locked instead). Observed in a fresh git repo containing pyproject.toml, .python-version and src/ but no uv.lock. Side effect seen: the failed uv sync --frozen still printed Using CPython 3.14.7 / Creating virtual environment at: .venv and left a .venv with no packages in site-packages (only _virtualenv.py/.pth). Tested with uv 0.12.6 on Linux.