Package installation issue · Usually quick to fix
npm ERR! ERESOLVE unable to resolve dependency tree
Something went wrong installing packages. This is usually fixable by cleaning up and reinstalling.
What the error looks like
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
Why it happens
Package conflicts, corrupted cache, outdated lock file, or a package that doesn’t support your Node.js version.
How to fix it
- Delete the node_modules folder and package-lock.json, then run npm install
- Try: rm -rf node_modules package-lock.json && npm install
- If that doesn’t work, try clearing the npm cache: npm cache clean --force
Ask your AI coding tool to fix it
Paste this prompt into Claude Code, Cursor, Bolt or Lovable, with your own error in place of the example.
I'm getting this error and I need help understanding and fixing it:
```
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
```
Please:
1. Explain what this error means in plain English
2. Tell me the most likely cause
3. Give me the exact code changes or commands I need to fix it
4. Show me how to prevent this error in the future
Got a different error?
Paste any error into the free Error Decoder and get it explained in plain English, with a fix prompt.
Decode my error