StackBlitz npm ERR! code ERESOLVE Conflicting Peer Dependency
Quick answer
npm 7+ installs peer dependencies automatically, causing conflicts. Use --legacy-peer-deps; StackBlitz retries with it for you during automatic installs.
Most likely fix: Reinstall without the lockfile
How to fix it
Try these in order — the most common fix is first.
1. Reinstall without the lockfile
- Delete package-lock.json
- Run npm install
- Save the project
Did this fix it?2. Use legacy peer deps
- Run npm install --legacy-peer-deps
Did this fix it?3. Force the install
- Run npm install --force
Did this fix it?
Symptoms
npm install fails with npm ERR! code ERESOLVE or Conflicting peer dependency.
Why it happens
- npm 7+ auto-installs peer dependencies
This guide also covers
- stackblitz npm err eresolve
- stackblitz conflicting peer dependency
Still not working?
If StackBlitz keeps failing, you're not alone. See every StackBlitz problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to usOther StackBlitz errors
- StackBlitz Unable to Run Embedded Project: Third-Party Cookies Blocked
- StackBlitz Stuck on "Running start command" in Brave
- StackBlitz Not Working in Firefox or Safari
- StackBlitz Out of Memory on Mobile or Large Projects
- StackBlitz "Cannot load native addon because loading addons is disabled"
- StackBlitz Preview Reloading in an Infinite Loop
- Bolt.new Preview Blank Screen or "Your Preview Will Appear Here"
- Bolt.new Tokens Running Out Too Fast