Why is create-t3-turbo setup to have shadcn as shared package

So I recently started working on a project with create-t3-clerk and I've initialized shadcn in the nextjs folder, but when I deploy to vercel I'm getting some error: Type error: Cannot find module 'components/ui/button' or its corresponding type declarations. And looking up solutions online made me realize I maybe inited shadcn incorrectly. So I'm curious why the create-t3-turbo repo seems to have ui as a shared package and if there is any reason to not directly init shadcn in the nextjs folder
4 Replies
musab
musabOP10mo ago
Btw I did fix the build error by adding
"compilerOptions": {
"baseUrl": ".",
"paths": {
"components/*": ["src/components/*"],
"lib/*": ["src/lib/*"]
}
}
"compilerOptions": {
"baseUrl": ".",
"paths": {
"components/*": ["src/components/*"],
"lib/*": ["src/lib/*"]
}
}
To my tsconfig.json, but I'd like to understand more how this whole turbo repo thing works
Yiannis
Yiannis10mo ago
You need to first understand how monorepos work, and then the benefits of turborepo https://monorepo.tools https://turbo.build/
monorepo.tools
Monorepo Explained
Everything you need to know about monorepos, and the tools to build them.
Turbo
Turbo
Turbo is an incremental bundler and build system optimized for JavaScript and TypeScript, written in Rust.
musab
musabOP10mo ago
Ok will do some studying and come back with an update 🙏 Thanks for pointing out where to look
Yiannis
Yiannis10mo ago
No problem! Best of luck! T3 turbo is an incredible resource after you have grasped the basics of monorepos!
Want results from more Discord servers?
Add your server