[bug]: Peer Dependency Conflicts During Initialization and Adding Components with Next.js 15 #5562
Closed
2 tasks done
Labels
bug
Something isn't working
Describe the bug
I'm encountering peer dependency conflicts when trying to set up a project with shadcn UI and Next.js (latest v15) as well as when attempting to add components to the project.
Could you please update the initialization and component addition processes to better handle peer dependency issues, especially with React 19 (even in its release candidate state)?
Affected component/components
All
How to reproduce
Steps to Reproduce:
Workaround - I was able to complete the initialization by manually running the dependencies installation which were causing error but with
--legacy-peer-deps
.Workaround - To resolve the issue, I had to downgrade from React 19 (rc) to React 18
The conflicts seem to stem from peer dependencies that expect versions of React from 16.x to 18.x. When using the pre-release React 19, these packages (like react-hook-form, @hookform/resolvers, and others) cause the dependency resolution to fail.
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Before submitting
The text was updated successfully, but these errors were encountered: