npm ERESOLVE Peer Dependency Conflict Fixer
Turns npm "ERESOLVE unable to resolve dependency tree", pnpm "unmet peer" and yarn YN0060 output into the narrowest fix per package, instead of reaching for --legacy-peer-deps.
$1
What it does
- Reads npm 7-10 ERESOLVE, pnpm unmet-peer and yarn berry YN0060 output
- Groups conflicts by the package that declares the peer, with the version you have against the range it wants
- Knows the usual replacements for unmaintained packages that block React and ESLint upgrades
- Writes a package.json override scoped to one package instead of a global flag
- Gives the npm view commands that show whether a newer version already supports your peer
- Explains when --legacy-peer-deps is acceptable and why --force isn't
npm ERESOLVE Peer Dependency Conflict Fixer
Example session with this skill installed
npm install fails after we moved to React 18. Here's the output and our package.json.
- Read your context and instructions
- Compiled the npm eresolve peer
Peer dependency conflicts
npm: 1 package with peer requirements the project doesn't meet.
1. react-beautiful-dnd@13.1.1
- wants react ^16.8.5 || ^17.0.0, the project has 18.3.1
Known fix. react-beautiful-dnd is no longer maintained and never declared React 18 support. Replace it with @hello-pangea/dnd, a maintained fork with the same API: change the import paths and the package name.
Upgrade react-beautiful-dnd. Check whether a newer react-beautiful-dnd declares support for react 18.3.1.
npm view react-beautiful-dnd@latest peerDependencies
Or override, after checking it works.
{ "overrides": { "react-beautiful-dnd": { "react": "$react" } } }
Last resort for all of them: --legacy-peer-deps. It skips peer checks for every package, now and in CI. Never use --force.
Connects securely to your tools. The creator never sees your data.
About this skill
ERESOLVE unable to resolve dependency tree means a package declared which versions of another package it works with (a peer), and your project has a different one. The answer is in the error, buried in twenty lines, and the usual reaction, --legacy-peer-deps, switches the check off for every package, in CI too.
This skill reads npm 7-10, pnpm and yarn berry output, groups the conflicts by the package that declares the peer, shows the version you have against the range it wants, and gives the ways out in order: a known replacement (react-beautiful-dnd to @hello-pangea/dnd, react-hooks to renderHook, Enzyme to Testing Library), upgrading the package, moving the peer, or an override scoped to that one package, with the exact package.json snippet. It explains what --legacy-peer-deps and --force cost.
How it works
- Save the failing install output and give the agent your package.json.
- It runs the bundled Python script (standard library only, offline) and, if allowed, the
npm viewchecks it suggests. - It makes the package.json change and reinstalls.
Offline: it doesn't know which newer versions exist, so it gives the npm view commands to find out. An override makes npm accept a version the package's authors haven't declared; only tests and use show whether it really works. It reads the install output, not the lockfile.
A Python 3.8+ script using only the standard library parses the install output, checks versions against semver ranges (^, ~, x, ||, hyphen and comparison ranges), and reads package.json to tell direct from transitive dependencies. Output is Markdown or JSON; the exit code is 1 when conflicts are found, 2 when the output has none to read.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 day ago
- Software
Python 3.8+
- Optional
- npm (to run the suggested npm view checks)
Permissions
File Scopes
The bundled script uses only the Python standard library and makes no network calls; it suggests npm view commands for the agent to run if you allow it.
What's inside
Frequently Asked Questions
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.