-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug]: Using npx shadcn@latest init #5513
Comments
I can confirm having the exact same issue. Running npx shadcn@latest init in a fresh, empty folder and stuck with the message:
MacBook M2 Max |
I got the same issue i think it was because of my cluttered node_modules folder so i just remove the folder and install fresh dependencies and then it works fine for me. Ubuntu 22 |
Unfortunately was not a working solution for me. Also tried brew uninstall node and rm -r /opt/homebrew/lib/node_modules. But the issue persists |
All right so I investigated a bit further. as already seen in your screenshot it comes down to the @radix-ui/[email protected] being not compatible with the newest React 19.0.0 version. So that is what I did to get it working: Create a new next.js project without installing the dependencies after you are done cd into the created folder. There open the file called: package.json after that run:
and than
that did the trick for me. And I guess we have to wait till the mentioned package is compatible with the version 19 of React |
Thanks for the fast investigation, I was running into the same error. |
Another way of fixing this is by running npm install with legacy peer deps |
I've temporarily pinned |
i found this article, it solves my problem https://www.okitdev.com/posts/comment-resoudre-les-conflits-de-versions-react-avec-radix-ui-react-icons |
I have found a temporary solution, just install the next js, then install the shadcn, it will work. |
I'm working on a fix. Let's use #5557 to track since they are related. |
Describe the bug
Node version: v20.5.1
I've tried running npx shadcn@latest init aswell as pnpm dlx shadcn@latest init both not going past the "this can take several minutes" message as a fresh project. The longest I've waited is 20 minutes.
I figured I would install a clean next.js project and run it in there to see if maybe the init is stuck on something and not returning it. This resulted in the following error, perhaps related?
I am unable to install shadcn ui using the init command in any shape or form. Using it with vite is no problem, that works great.
Affected component/components
x
How to reproduce
npx shadcn@latest init
.npx create-next-app@latest
npx shadcn@latest init
within the new next.js projectCodesandbox/StackBlitz link
Can't reproduce a command
Logs
System Info
Before submitting
The text was updated successfully, but these errors were encountered: