-
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]: npx shadcn@latest add toast creating hooks folder outside components #4828
Comments
Same problem on mac |
Problem win 11 . node -v -- > v20.17.0 npx shadcn@latest init Something went wrong. Please check the error below for more details. request to https://ui.shadcn.com/r/styles/index.json failed, reason: self-signed certificate in certificate chain |
I have the same problem. |
SolutionThis solution works for me. Modify the newly added Change import { useToast } from "@/components/hooks/use-toast"; to import { useToast } from "@/hooks/use-toast"; This is because the Or you can move the |
The issue is not fixed, but can be handled manually quickly. |
Describe the bug
PS C:\Users\HP\Desktop\office\package-maker> npx shadcn@latest add toast
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
✔ Checking registry.
✔ Installing dependencies.
✔ Created 3 files:
Failed to compile
Next.js (14.2.5) out of date (learn more)
./components/ui/toaster.tsx:3:1
Module not found: Can't resolve '@/components/hooks/use-toast'
1 | "use client"
2 |
https://nextjs.org/docs/messages/module-not-found
Affected component/components
Toast
How to reproduce
Codesandbox/StackBlitz link
yes
Logs
System Info
Before submitting
The text was updated successfully, but these errors were encountered: