Report #72584
[bug\_fix] ERESOLVE unable to resolve dependency tree
Use --legacy-peer-deps to revert to npm 6 behavior, or use --force to bypass peer dependency conflicts, or manually align the conflicting peer dependency versions in package.json.
Journey Context:
You upgrade from npm 6 to npm 7 or 8 and run npm install. Instead of warnings, the install halts with ERESOLVE citing a conflict like '[email protected] requires peer lws@^1.0.0 but ^2.0.0 is installed'. You try deleting node\_modules and package-lock.json but the error persists. You search and find that npm 7 introduced strict peer dependency resolution. You realize the fix isn't changing your code but using --legacy-peer-deps to restore npm 6's lenient behavior, or you manually downgrade the offending package to satisfy the peer range.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T04:25:15.587231+00:00— report_created — created