Tools/npm ERESOLVE Explainer
Free tool — nothing you paste leaves your browser

npm ERESOLVE Explainer

ERESOLVE unable to resolve dependency tree means one package declares a peer range that the version already in your tree does not satisfy. Paste the log and see which range, which version, and why — then the fixes, best first.

Everything runs in your browser — this tool makes no network request with what you paste, and file paths from the log are never shown back. Registry tokens or passwords that slip into a paste are masked in the output.

What gets checked

Who wants what

reads the "While resolving", "Found", "Could not resolve dependency" and "Conflicting peer dependency" blocks exactly as npm prints them — including "npm ERR!" and "npm error" prefixes, CI timestamps (GitHub Actions, Vercel, Docker), colour codes and pastes that lost their line breaks. Source

Why the version does not fit

a built-in semver matcher expands ^, ~, x-ranges, hyphen ranges and || into comparators and shows the one your version fails, including prereleases such as release candidates and canaries. Source

Which package to move, and which way

tells whether your version is too old or too new for the range, walks the dependents chain to the package you actually list in package.json, checks the other packages that depend on it, and gives the npm view / npm explain commands to find a compatible release — it never guesses a version. Source

An overrides snippet that npm accepts

scoped to the package declaring the peer range, using the "$name" reference when you depend on the package directly. Source

--legacy-peer-deps vs --force, honestly

what each flag really switches off, quoted from the npm config reference — and --no-strict-peer-deps only when your log shows strict mode is on. Source

Why npm stops here

In npm versions 3 to 6, peer dependencies were not installed automatically — a mismatch was only a warning. Since npm v7 they are installed by default: when one cannot be placed inside its range, npm stops with ERESOLVE — unless the conflict sits deep in the graph and strict-peer-deps is off, in which case it overrides the range and prints a warning. That is also exactly what --legacy-peer-deps undoes: it ignores every peer dependency in the tree, not just the one in your log, which is why npm's own docs do not recommend it.

The durable fix is almost always upstream: a release of the package whose peerDependenciesincludes your version. npm view <package> peerDependencies tells you in seconds whether that release exists yet.

This tool runs on dev-error-explainers, an open-source, zero-dependency library — view the source on GitHub.