[bug]: Installation fails of react-day-picker with Nextjs 15 #2569
-
SummaryAn error occurs when attempting to install the react-day-picker package in a newly created Next.js 15.0.1 project, due to a dependency conflict with React. CodeHow to reproduce.
Environment
Expected BehaviorThe react-day-picker package should install successfully without dependency conflicts. Actual BehaviorThe installation fails due to a version conflict. react-day-picker@9.2.0 requires a peer dependency of react@">=16.8.0", which does not resolve with the specified React version (19.0.0-rc-69d4b800-20241021) in the Next.js 15.0.1 environment. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
👋 @GeorgeMapili, thanks for the report! The issue is because the installed React version is a release candidate. Why would Next.js install an RC of React and expect maintainers to support it in its peer dependencies? I'm currently busy with other changes. |
Beta Was this translation helpful? Give feedback.
-
Hi all :). Is there a workaround for this issue until Next.js uses an "official" React build? |
Beta Was this translation helpful? Give feedback.
-
Hello @gunnarrb , As we’re currently utilizing the latest versions of React and Next.js, it’s essential to ensure that all dependencies, including libraries like To enforce this across all packages in the project, we can use the following code block, Add this on
This configuration guarantees that the latest versions of react and react-dom are consistently applied throughout your app. |
Beta Was this translation helpful? Give feedback.
Hello @gunnarrb , As we’re currently utilizing the latest versions of React and Next.js, it’s essential to ensure that all dependencies, including libraries like
react-day-picker
, remain compatible with these versions and do not revert to React 18 and below.To enforce this across all packages in the project, we can use the following code block, Add this on
package.json
This configuration guarantees that the latest versions of react and react-dom are consistently applied throughout your app.