Node.js

Fix npm "ERESOLVE unable to resolve dependency tree"

Two packages want different versions of the same thing. Find the clash and update, or install around it for now.

Fill these in once
  1. See which versions clash
    Terminal
    npm ls react

    The error message names the package; put it in the box above.

  2. Best fix: update the package that's behind
    Terminal
    npm install react@latest
  3. Quick workaround: install anyway, the old way
    Terminal
    npm install --legacy-peer-deps

    It installs, but the clash is still there. Fix it properly when you can.

  1. See which versions clash
    Terminal · Ubuntu / Debian
    npm ls react

    The error message names the package; put it in the box above.

  2. Best fix: update the package that's behind
    Terminal · Ubuntu / Debian
    npm install react@latest
  3. Quick workaround: install anyway, the old way
    Terminal · Ubuntu / Debian
    npm install --legacy-peer-deps

    It installs, but the clash is still there. Fix it properly when you can.

  1. See which versions clash
    PowerShell
    npm ls react

    The error message names the package; put it in the box above.

  2. Best fix: update the package that's behind
    PowerShell
    npm install react@latest
  3. Quick workaround: install anyway, the old way
    PowerShell
    npm install --legacy-peer-deps

    It installs, but the clash is still there. Fix it properly when you can.