Node.jsexit code > 0
npm ERR! code ERESOLVE
$npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
Analysis
NPM cannot find a valid set of versions for your dependencies that satisfies all constraints (peer dependency conflict).
Common Triggers
- ●Installing a package that requires a different version of a shared dependency than one already installed.
- ●Upgrading Node.js or NPM to a version with stricter peer dependency rules (NPM 7+).
Debug Checks
- $Read the 'Conflicting peer dependency' section of the npm output.
Resolution
1
Try with
--legacy-peer-deps (not recommended but often works): npm install --legacy-peer-deps.2
Use
--force to bypass conflicts (use with caution).3
Manually align the conflicting dependency versions in
package.json.Metadata
- Tool
- Node.js
- Severity
- High
- Tags
- #node.js#npm#dependencies