gpbl/react-day-picker

Bug: Dependency conflict with date-fns version 3.0.1

Closed this issue · 3 comments

Bug description

When attempting to update dependencies in a project using react-day-picker and date-fns, I encountered a dependency conflict with the latest version of date-fns (3.0.1).

To reproduce

  1. Have a project with both react-day-picker and date-fns.
  2. Run npm outdated to see the available updates.
  3. Run npm update.

Expected behavior

I expected all dependencies to update without any conflicts.

Actual behaviour

npm ERR! Found: date-fns@3.0.1
npm ERR! node_modules/date-fns
npm ERR!   date-fns@"^3.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer date-fns@"^2.28.0" from react-day-picker@8.9.1
npm ERR! node_modules/react-day-picker
npm ERR!   react-day-picker@"^8.9.1" from the root project

Environment

Node.js version: 20.5.0
npm version: 10.1.0
react-day-picker: 8.9.1
date-fns: 3.0.1

gpbl commented

We added support for date-fns@3 in version 8.10. Please upgrade react-day-picker before upgrading date-fns. Thanks!

Thank you @gpbl I upgraded react-day-picker first, then date-fns 3 and it worked perfectly.