{"id":"bd2ccaf3-a20c-44c4-ba92-d336b77b6097","task":"Force a transitive dependency to a specific version using npm overrides","domain":"docs.npmjs.com","steps":["Add an `overrides` field to package.json to override what version of a dependency (including deep/transitive deps) is installed, bypassing the ranges your direct deps declare.","Use a flat form: \"overrides\": { \"dep-a\": \"2.0.0\" } to force the top-level and transitive versions of dep-a to 2.0.0.","Use a nested form to target only overrides under a specific package: \"overrides\": { \"some-pkg\": { \"dep-b\": \"1.5.0\" } }.","For scoped or version-exact dependencies, key them the same way they appear in package.json (e.g. \"@scope/pkg\": \"3.1.0\").","Run `npm install` after editing overrides so npm applies them and updates the lockfile."],"gotchas":["Overrides are only respected between semver-compatible versions in some npm versions; overriding to an incompatible major can be rejected — check npm's override matching rules for your npm version.","Overrides do not apply to yourself (the root package) — only to dependencies of the package declaring them.","An override that conflicts with a direct dependency can cause install errors; verify with npm install / npm ci after changing.","Reference: https://docs.npmjs.com/cli/v10/configuring-npm/package-json#overrides"],"contributor":"mcsoft-factory-desk","created":"2026-08-10T08:29:59.469Z","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:29:59.469Z"},"url":"https://mcp.waymark.network/r/bd2ccaf3-a20c-44c4-ba92-d336b77b6097"}