Skip to content

Dependencies and installation ​

Encyclopedia home · Search machine-readable catalog

The broken snippets are deliberate negative examples. Use only in an isolated fixture repository or lab.

F029 ​

pytest missing from uv project

Symptom. Failed to spawn pytest.

Root cause. pytest must be declared in the project dependency group.

Broken example

bash
uv run pytest

Corrected example

bash
uv sync --locked
uv run --locked pytest

Verification. Add it using uv add --dev pytest locally and commit the lock.

Correction validation syntax-validated.

F030 ​

Typo in test executable

Symptom. failed to spawn pytrest.

Root cause. The runner tries to launch a nonexistent executable.

Broken example

bash
uv run pytrest

Corrected example

bash
uv run pytest

Verification. Read the exact command in the failed step and verify correction.

Correction validation syntax-validated.

F047 ​

Lockfile stale after declaration change

Symptom. lockfile changes unexpectedly or environment diverges.

Root cause. The default sync can rewrite resolution instead of reporting drift.

Broken example

bash
uv sync

Corrected example

bash
uv sync --locked

Verification. Change pyproject.toml only in a fixture and expect a nonzero result.

Correction validation syntax-validated.

F032 ​

npm manifest and lock disagree

Symptom. CI and developer environments resolve different versions.

Root cause. Floating CI install hides a stale package-lock.json.

Broken example

bash
npm install

Corrected example

bash
npm ci

Verification. Update and commit lock locally then verify clean npm ci.

Correction validation syntax-validated.

F033 ​

CI omits dependencies needed for tests

Symptom. test binary not found.

Root cause. Test runners are in devDependencies.

Broken example

bash
npm ci --omit=dev
npm test

Corrected example

bash
npm ci --include=dev
npm test

Verification. Keep production pruning in a later packaging job.

Correction validation syntax-validated.

F034 ​

Wrong Python executable

Symptom. No module named pytest.

Root cause. pip and test interpreter target different installations.

Broken example

bash
pip install -r requirements.txt
python3.12 -m pytest

Corrected example

bash
python3.12 -m pip install -r requirements.txt
python3.12 -m pytest

Verification. Inspect sys.executable and pip --version.

Correction validation syntax-validated.

F035 ​

Unpinned downloads break builds

Symptom. build suddenly changes after a registry release.

Root cause. Dependencies were not locked across runs.

Broken example

bash
pip install latest-tool

Corrected example

bash
python -m pip install --require-hashes -r requirements.txt

Verification. Repeat checkout install and compare resolved versions.

Correction validation syntax-validated.

F036 ​

Node version below project engines

Symptom. EBADENGINE or syntax error.

Root cause. Toolchain ignored committed configuration.

Broken example

yaml
uses: actions/setup-node@v4
with: {node-version: "18"}

Corrected example

yaml
uses: actions/setup-node@v4
with: {node-version-file: ".node-version"}

Verification. Print node --version and inspect engine requirement.

Correction validation syntax-validated.

F037 ​

Go dependency cache mistaken for version control

Symptom. tests pass with uncommitted dependency changes.

Root cause. CI updates manifest and sums rather than rejecting drift.

Broken example

bash
go mod tidy
go test ./...

Corrected example

bash
go mod verify
go test -mod=readonly ./...

Verification. Deliberately omit declared module and verify go test fails.

Correction validation syntax-validated.

F038 ​

Registry auth configured after installing

Symptom. 401 or 404 on private package.

Root cause. Install starts before its secured environment is available.

Broken example

bash
npm ci
test -n "$NODE_AUTH_TOKEN"

Corrected example

bash
test -n "${NODE_AUTH_TOKEN:?}"
npm ci

Verification. Scope token to registry and test with approved package fixture.

Correction validation syntax-validated.