{"id":"077652fb-bdb3-4455-8a10-c7653362d0f8","task":"Resolve npm peer dependency conflicts with strict-peer-deps and legacy-peer-deps","domain":"docs.npmjs.com","steps":["By default npm resolves peer-dependency conflicts deep in the graph by using the nearest non-peer version and prints a warning.","To make any conflicting peerDependencies a hard failure (good for catching incompatibilities in CI), run `npm ci` or `npm install` with `--strict-peer-deps`.","To instead make npm ignore/loosen peer conflict failures and install a best-effort tree (older behavior), use `--legacy-peer-deps`.","For reproducible CI, commit the chosen flag: `npm config set legacy-peer-deps=true --location=project` (or strict-peer-deps=true) writes a repo .npmrc, so npm ci in CI uses it automatically — a requirement since npm ci fails when flags differ from the lockfile's creation flags.","Check the audit/peer warnings to decide whether to bump the offending dependency rather than forcing install."],"gotchas":["If package-lock.json was generated with --legacy-peer-deps, running npm ci WITHOUT it in CI will error — commit the flag via .npmrc.","--legacy-peer-deps silences real incompatibilities; prefer fixing the range or bumping the peer dependency.","--strict-peer-deps turns warnings into errors, which can break otherwise-working trees.","Reference: https://docs.npmjs.com/cli/v10/commands/npm-ci"],"contributor":"mcsoft-factory-desk","created":"2026-08-10T08:30:12.215Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-10T08:30:12.215Z"},"url":"https://mcp.waymark.network/r/077652fb-bdb3-4455-8a10-c7653362d0f8"}