How do you setup Shadcn with Create t3?

Out of the box it does not work, if I try to add Button I get this error:
11 Replies
Alejo
Alejo3y ago
Did you try doing npm i or pnpm i?
josh-dev627
josh-dev627OP3y ago
Yes I've tried it right now but still showing the same error Ahh @Alejo I think the problem is when I added the Button it did not include the radix library so I had to install it myslef.
Ambushfall
Ambushfall3y ago
I've just got it setup Going through it, I'd just use cva myself and not use their component lib I've also had the error, declaring their mod.d.ts helped
Ambushfall
Ambushfall3y ago
Ambushfall
Ambushfall3y ago
Ambushfall
Ambushfall3y ago
Just the way to install it requires manual setup usually, hope you got your difficulties resolved
abcdef
abcdef3y ago
@josh-dev627 Have you tried reading the error message It literally says what the problem is
Gabriel
Gabriel3y ago
@lukacolic Why are you using asChild Button instead of
<Link className={buttonVariants({ variant: "default" })>
Google
</Link>
<Link className={buttonVariants({ variant: "default" })>
Google
</Link>
Ambushfall
Ambushfall3y ago
Because you can? xD Just a showcase that it works, I'm not going to use it otherwise
Gabriel
Gabriel3y ago
Oh okay aahaha
Ambushfall
Ambushfall3y ago
heheh :3

Did you find this page helpful?