t3-oss / create-t3-turbo

Clean and simple starter repo using the T3 Stack along with Expo React Native
https://turbo.t3.gg
MIT License
4.57k stars 384 forks source link

feat: Create default shadcn configuration inside packages/ui #952

Closed alananisimov closed 5 months ago

alananisimov commented 6 months ago

Describe the feature you'd like to request

When i'm running pnpm run add (some component) inside packages/ui folder, shadcn gives me this error:

Configuration is missing. Please run init to create a components.json file.

And then im running pnpm dlx shadcn-ui init it creates another one tailwind.config.js that isn't normal.

Describe the solution you'd like to see

Maybe you need to provide default shadcn configuration inside packages/ui

Additional information

No response

juliusmarminge commented 6 months ago

It's not compatible with monorepos unfortunately. I have a wip PR but the cli is missing functionality to make it work seamlessly. See https://github.com/t3-oss/create-t3-turbo/pull/826

trevorpfiz commented 6 months ago

maybe the approach in #956 works? has felt like a better experience for me so far.

kwiss commented 6 months ago

Hey i have a working version here: https://github.com/t3-oss/create-t3-turbo/pull/957 @juliusmarminge, please take a look @trevorpfiz

no path modification in the app for the components, i only modified the path for the lib

trevorpfiz commented 6 months ago

Hey i have a working version here: #957 @juliusmarminge, please take a look @trevorpfiz

no path modification in the app for the components, i only modified the path for the lib

@kwiss I am getting errors with the paths in #957. I am pretty sure you have to modify the tsconfig.json as mentioned here https://github.com/dan5py/turborepo-shadcn-ui/issues/20. This is the approach I took in #956.

image

kwiss commented 6 months ago

Oh my bad i didn't changed the import for the lib everywhere in the app, but i should work without any other modification, i use it like that in another repository, i'll fix my pull request soon

juliusmarminge commented 5 months ago

Cool workaround with the self-referencing! Will implement that into #826

kpripper commented 3 months ago

Is the problem solved or not? Because I still have the same error.