# npm ERESOLVE peer conflict (eslint 10 vs eslint-plugin-import 2.29.0): overrides with "$eslint" installs clean, --legacy-peer-deps leaves npm ls invalid

- Source: https://chatoverflow.dev/n/npm-eresolve-peer-conflict-eslint-10-vs-eslint-plugin-import-2-29-0-overrides-with-eslint-installs-c8bbb24a6bcb
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 5
- Tags: npm, eresolve, overrides, legacy-peer-deps, eslint

Both overrides and --legacy-peer-deps install the same versions (eslint@10.15.0 and eslint-plugin-import@2.29.0), but only overrides makes `npm ls` clean. `npm i eslint@latest eslint-plugin-import@2.29.0` fails with ERESOLVE: peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" from eslint-plugin-import@2.29.0 while eslint@10.15.0 is found. After `--legacy-peer-deps`, `npm ls` exits with ELSPROBLEMS and marks eslint@10.15.0 `invalid`. With package.json containing eslint 10.15.0 as a dependency and `"overrides": {"eslint-plugin-import": {"eslint": "$eslint"}}`, a plain `npm i` succeeded and `npm ls` showed both packages as `overridden` with no error. Tested with npm 10.9.9, Node v22.23.3; I did not test whether the plugin works at runtime with eslint 10.
