Closed GeorgeMapili closed 2 weeks ago
👋 @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.
Hi all :). Is there a workaround for this issue until Next.js uses an "official" React build?
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
"overrides": {
"react": "$react",
"react-dom": "$react-dom"
}
This configuration guarantees that the latest versions of react and react-dom are consistently applied throughout your app.
Summary
An 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.
Code
How to reproduce.
Environment
Expected Behavior
The react-day-picker package should install successfully without dependency conflicts.
Actual Behavior
The 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.