Skip to content

[bug]: Shadcn not validating Tailwind CSS installation after Tailwind 4 update #6446

@Ranbir5ingh

Description

@Ranbir5ingh

Describe the bug

After the update to Tailwind CSS 4, the npx shadcn@latest init command fails to validate the Tailwind CSS installation due to the removal of the Tailwind config file. This prevents the proper initialization of Shadcn. It is recommended to update the installation documentation to reflect these changes.

Image

Affected component/components

N/A (This issue affects the initialization process rather than specific components)

How to reproduce

  1. Update Tailwind CSS to version 4.
  2. Run the command npx shadcn@latest init.
  3. Observe that the command fails to validate the Tailwind CSS installation.

Codesandbox/StackBlitz link

No response

Logs

✔ Preflight checks.
✔ Verifying framework. Found Vite.
✖ Validating Tailwind CSS.
✖ Validating import alias.

No Tailwind CSS configuration found at C:\Users\ranbi\OneDrive\Desktop\Portfolio website\client.
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/vite to get started.

No import alias found in your tsconfig.json file.
Visit https://ui.shadcn.com/docs/installation/vite to learn how to set an import alias.

System Info

- Operating System: Windows 11
- Node.js version: (v22.12.0)
- NPM version: (10.9.0)

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtailwind

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions