Next.js Discord

Discord Forum

Problems with client components using turborepo

Unanswered
Cão Fila de São Miguel posted this in #help-forum
Open in Discord
Cão Fila de São MiguelOP
Heya!
I'm building a monorepo and I've started with using Turborepo Template with Tailwind (https://github.com/vercel/turbo/tree/main/examples/with-tailwind). I was starting to implement the authentication using auth.js, and when I've tried to import a button that I've defined on the ui package (using the use client directive) it was failing. Do we have to do any additional tweaks to make this package work with both server side and client side components?

I've tried the solution given here https://stackoverflow.com/questions/76525345/client-components-in-turborepo-cause-error but it started giving some errors of not finding the styles.css file on the ui package. Is there any good solution, or should I just stick to using componentes per workspace on the monorepo and delete the ui package?

0 Replies