npm ERESOLVE Conflict

ErrorIntermediateSeverity: LowNode.js and npm

npm ERR! code ERESOLVE ... unable to resolve dependency tree.

Symptoms

  • npm ERR! code ERESOLVE ... unable to resolve dependency tree.

Cause

Two packages require different versions of a shared (peer) dependency, usually after the agent added a library built for a different version of the framework.

Fix

  • Read which package causes it in the message, and choose a compatible version of it.
  • The --legacy-peer-deps option skips the check but may hide a real problem; use it knowingly.

Prevention

  • Do not accept a new dependency without checking its compatibility.

Sources

  1. npm Docs: legacy-peer-deps