Reputation: 1
What's going wrong over here?
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/date-fns
npm error date-fns@"^4.1.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer date-fns@"^2.28.0 || ^3.0.0" from [email protected]
npm error node_modules/react-day-picker
npm error react-day-picker@"8.10.1" 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\\mukhi\\AppData\\Local\\npm-cache_logs\\2024-12-09T05_35_36_426Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\\Users\\mukhi\\AppData\\Local\\npm-cache_logs\\2024-12-09T05_35_36_426Z-debug-0.log
Upvotes: 0
Views: 351
Reputation: 52
The simplest way is to bypass strict dependency checks using the --legacy-peer-deps
flag:
npm install --legacy-peer-deps
This reverts to the dependency resolution strategy used in npm v6, ignoring peer dependency conflicts. While this works, it may lead to runtime issues if dependencies are truly incompatible.
--force
(Not Recommended)You can force npm to ignore dependency conflicts by using the --force
flag:
npm install --force
However, this approach may result in a broken or unstable project, as the incompatible versions are forcibly installed.
Upvotes: 0