#npm error While resolving: next-enterprise@0.0.0npm error Found: react@19.0.0
1 messages · Page 1 of 1 (latest)
Hi @lime mica. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Based on the information provided in the knowledge sources, it appears you're encountering a dependency resolution error related to React 19 and Next.js 15. This is a known issue that has been reported by several users.
The error occurs because Next.js 15 includes React 19 Release Candidate (RC) as a peer dependency, which can cause conflicts with packages that have peer dependencies specifying earlier versions of React.
Here are a few potential solutions:
-
Use package overrides:
Add the following to yourpackage.json:"overrides": { "react": "$react", "react-dom": "$react-dom" }This approach is suggested in this GitHub issue comment.
-
Install dependencies with the
--legacy-peer-depsflag:npm install --legacy-peer-depsHowever, note that this might lead to potential compatibility issues.
-
Downgrade React to version 18, although this is not recommended if you want to ensure compatibility with the upcoming React 19.
-
Wait for package maintainers to update their peer dependencies to include React 19.
It's worth noting that this issue is being actively discussed and worked on by the Next.js team. For the most up-to-date information and official solutions, you may want to check the Next.js GitHub repository for any recent updates or announcements regarding this issue.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@lime mica Kapa.ai is still learning and improving, please let me know how I did by reacting below.