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:
npm install -g npm-check-updates
ncu
ncu -u
At this stage, everything worked well, but when I ran:
4. npm install, I got this error below in my terminal:
$ npm install
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: nextjs14@0.1.0
npm error Found: eslint@9.13.0
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 eslint-config-next@14.2.15
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