StackBlitz npm ERR! code ERESOLVE Conflicting Peer Dependency

Share
Workaround available All browsers Updated November 14, 2026How we research

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. 1. Reinstall without the lockfile

    1. Delete package-lock.json
    2. Run npm install
    3. Save the project
    Did this fix it?
  2. 2. Use legacy peer deps

    1. Run npm install --legacy-peer-deps
    Did this fix it?
  3. 3. Force the install

    1. 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 us
Fixed it? Share this guide

Other StackBlitz errors

All 11 StackBlitz errors and fixes →