Fix · Node, npm and build
npm ERESOLVE: dependency conflict
What you may see
- npm install stops with unable to resolve dependency tree
- It tells me to use --force or --legacy-peer-deps
Most likely cause
Two packages need different versions of a third one, often after upgrading React or Next.
Check first (about two minutes)
- Read the lines "Found:" and "Could not resolve dependency": they name the packages in conflict.
The fix prompt
What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.
Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.
Prompt language
Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.
After you tried it, did it work?
Steps
- Show the conflict and which package asks for which version.
- Look for the version of the old package that supports my version, or a newer package that does.
- Only if there is no safe alternative, explain what --legacy-peer-deps means and ask me before using it.
- Run npm install and then the build and a quick test.
Do not do this
- Do not use --force as the first answer.
- Do not upgrade React, Next or other main packages to new major versions without telling me.