Bilo Guides FAQ

npm ERR! code ERESOLVE: what it means and how to fix it

Some packages say "I only work with version X of another package" (a peer dependency). Your project asks for a different version, so npm stops instead of guessing. The message lists which package wants what; that list is the real clue.

The error looks like this:

npm ERR! code ERESOLVE

How to fix it

  1. Read the top of the message. Find the lines that start with Found: and Could not resolve dependency. They name the package you have and the one that wants something else.
  2. Try the clean fix first. Update or choose a version of the package the message names so both sides agree, then run npm install again. If an AI tool added the package, ask it for a version that matches your other packages.
  3. If you must move on, loosen the check. Run npm install --legacy-peer-deps. This makes npm ignore peer dependencies completely, so it can hide a real mismatch. Treat it as a temporary workaround and test the app afterwards.
  4. Avoid --force as a habit. The npm docs describe --force as switching off many safety checks, not only this one. Use it only if you understand what it overrides.

What you should see

The install finishes and a node_modules folder appears. With --legacy-peer-deps npm stays quiet about the conflict, so run your app and check that it starts.

Not fixed? Bring the exact message to Bilo and we will look at it with you.

Still stuck? Paste your error into Bilo

Quick questions

Is --legacy-peer-deps safe?

It is a workaround, not a repair. npm stops enforcing what packages say they need, so something may break later. Prefer matching versions when you can.

Why did it work on my friend's computer?

Older npm versions (3 to 6) ignored peer conflicts, and the same project can resolve differently with different npm versions or lock files. Check npm -v on both.

Can I make this error stricter instead?

Yes. The strict-peer-deps setting turns even small peer conflicts into failures. You usually do not need it as a beginner.

Sources and date checked

Written in our own words from the official pages above. Tool names are only references; we are not affiliated with them. Commands change between versions, so check the linked docs if something differs.

Tell us your idea and get a blueprint with an estimated cost, free.

Start the free interview

Bilo works by connecting to your own AI (Claude, ChatGPT, …). You need an account with that AI, and the usage for writing things comes out of your own AI plan.