shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
71.06k stars 4.28k forks source link

[bug]: Next.js intall instructions missing tailwind step #4809

Open jamiehewitt15 opened 3 weeks ago

jamiehewitt15 commented 3 weeks ago

Describe the bug

Try running the installation command in a next.js project where tailwind has not previously been used and it leads to an error. The installation instructions seem to be missing a step (i.e. set up tailwind). It doesn't say in the documentation that tailwind is a necessary dependency.

Affected component/components

installation

How to reproduce

  1. Run npx shadcn@latest init in a next.js project where tailwind has not been previously used.
  2. get the following error: ✖ Validating Tailwind CSS.

Codesandbox/StackBlitz link

No response

Logs

$ npx shadcn@latest init
✔ Preflight checks.
✔ Verifying framework. Found Next.js.
✖ Validating Tailwind CSS.
✔ Validating import alias.

No Tailwind CSS configuration found at ...
It is likely you do not have Tailwind CSS installed or have an invalid configuration.
Install Tailwind CSS then try again.
Visit https://tailwindcss.com/docs/guides/nextjs to get started.

### System Info

```bash
next.js running on ubuntu.

Before submitting

Char99s commented 3 weeks ago

The docs do say that TailwindCSS is required to use shadcn-ui but only on the manual installation page. Even I didn't realise that earlier but here is the link if you want to check it out:

https://ui.shadcn.com/docs/installation/manual

mellolauro commented 3 weeks ago

Even after manual installation, the same problems persist when installing the components.

Char99s commented 3 weeks ago

Even after manual installation, the same problems persist when installing the components.

I wasn't saying that the manual installation will solve this issue. I'm saying that it says there that you need tailwindcss because the components are built using it, so you can't use them if you don't have tailwindcss

mellolauro commented 3 weeks ago

No problem, I was just warning the other members that the problem persists, as I have tried every way and nothing works.

Char99s commented 3 weeks ago

No problem, I was just warning the other members that the problem persists, as I have tried every way and nothing works.

Apologies, first time using github mobile and I thought your comment was a reply to mine