#19 most commondependenciesLovableBolt.newCursorReplitv0Windsurf
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree ... Could not resolve dependency: peer react@"^16.8.0 || ^17.0.0" from [email protected]
Got a slightly different error? Paste the exact message and get a fix prompt tailored to it.
Paste your error →What it means
Two of your add-on packages want different versions of the same thing (often React), and npm refuses to guess which one wins.
How to fix it: paste this prompt into your AI builder
Fix prompt for Lovable, Bolt, Cursor, Replit, v0, Windsurf
npm install fails with ERESOLVE. Read which package requires which peer version. Fix it by upgrading the conflicting package to a version that supports my current React/Next version (or picking a maintained alternative), and update package.json accordingly. Use --legacy-peer-deps only as a last resort and tell me if you do. Don't upgrade unrelated packages or change app code beyond what the new version needs.
If the AI can't fix it: manual steps
- Look for 'Could not resolve dependency: peer X from Y'; Y is the package that is out of date.
Where this happens
Seen in these AI app builders and editors:
LovableBolt.newCursorReplitv0Windsurf
Sources
Related dependencies errors
Still stuck? Paste your full error and UnstuckMyVibe will match it and hand you the exact fix prompt.
Fix my error →