npm ERR! code EOVERRIDE — Override for x conflicts with direct dependency
An "overrides" entry sets a different version for a package you also depend on directly.
Seen on:
npm
Meaning
npm requires the override to match the direct dependency spec (use "$pkg" to reference it).
Common causes
- Override version differs from the direct dependency range
- Copying override examples that pin a version you also list directly
⚡ Quick fix
- Use the "$name" reference: "overrides": { "react": "$react" }
- Align the direct dependency version with the override
Detailed fix by platform
npm
"overrides": { "foo": { "react": "$react" } }
How to diagnose
- Specs — Direct vs override versions
- Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026