Common errorsBlogSponsor

Bolt error: "npm ERR! ERESOLVE unable to resolve dependency tree"

What it means

Two of your app's packages want different versions of the same thing, and npm won't pick one. This often happens after Bolt adds a new library.

How to fix it

  1. Ask Bolt: "npm install fails with ERESOLVE. Fix package.json so versions are compatible. Don't add new packages."
  2. If it keeps failing, ask Bolt to run npm install --legacy-peer-deps.
  3. Once it installs, reload the preview.

FAQ

Why does npm install keep failing in Bolt?

Two packages need different versions of the same dependency, and npm won't choose between them.

How do I fix ERESOLVE in Bolt.new?

Ask Bolt to make the versions in package.json compatible without adding new packages. If it still fails, have it run npm install --legacy-peer-deps.

Is --legacy-peer-deps safe?

For most small projects, yes. It tells npm to install anyway and ignore strict version checks.

Still stuck? Paste the full error into Unstuck for one fix prompt made for Bolt. Your first 3 fixes are free.

Get my fix prompt — 3 free