Terminal

npm error code ERESOLVE: unable to resolve dependency tree

What it means
Two packages in your project are asking for incompatible versions of another package.
Likely causes
  • Adding an older library that hasn't updated its peer dependency list for React 19 or Next.js.
  • Pinning a package version that clashes with what another installed package expects.
Prevention
Prefer maintained packages from your stack skills instead of unmaintained add-ons.

Copy for your agent

npm failed with ERESOLVE. Read which two packages conflict, pick compatible versions (or a modern alternative) and explain the fix before changing package.json.

Full help article“Module not found” after pulling changes

Last reviewed Nov 8, 2026