npm error ERESOLVE unable to resolve dependency tree | Could not resolve dependency | dependency conflict eslin & eslint-config-next

Author: sofiane-abou-abderrahimCreated Oct 21, 2024Updated Aug 24, 2026
Labelsfaqawaiting reply

I've just used the npm-check-updates package in my Next.js 14 application to update Next.js and all my packages to the latest versions.

In my terminal, I ran the following commands:

  1. npm install -g npm-check-updates
  2. ncu
  3. ncu -u

At this stage, everything worked well, but when I ran: 4. npm install, I got this error below in my terminal:

bash
$ npm install
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/eslint
npm error   dev eslint@"^9" from the root project
npm error
npm error Could not resolve dependency:
npm error peer eslint@"^7.23.0 || ^8.0.0" from [email protected]
npm error node_modules/eslint-config-next
npm error   dev eslint-config-next@"14.2.15" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error C:\Users\DELL\AppData\Local\npm-cache\_logs\2024-10-21T07_18_58_317Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\Users\DELL\AppData\Local\npm-cache\_logs\2024-10-21T07_18_58_317Z-debug-0.log

Source: raineorshine/npm-check-updates