ui
ui copied to clipboard
Adding Shadcn to turborepo monorepo causing import errors
Hi, I am adding shadcn to turborepo monorepo and while initialising shadcn it adds components folder in @ folder.
the folder structure of ui folder.
tsconfing.json
components.json
issue while importing
Hi @shadcn, I have similar issue with turborepo vite setup.
There is a repo turborepo-shadcn-ui where this setup works perfectly with nextjs. I tried to do the same with Vite but it seems I am missing something and see exactly this error as an OP.
Maybe the cause is different, but could you please give us some insight into how we can fix it?
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.
Hi @shadcn, this seems to still very much be an issue. I've tried creating a new package within the monorepo and redoing the init step to rule out that it was done incorrectly the first time, but it's still producing the same result. Following the pnpm dlx shadcn-ui@latest init step, I am running pnpm dlx shadcn-ui@latest add to select multiple components at a time. Instead of being placed into the packages/shadcn folder, they are being placed at the root of the project in a directory named @.
Do you have any insight on the proper way to configure shadcn within a turborepo?
Just confirming this is still an issue, just tried to init shadcn in a turborepo (nextjs) project and stumbled upon the same import errors. I think it needs to be re-opened @shadcn?
same here
same