Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: Sidebar component import not working after migrating to tailwind v4 #6458

Open
2 tasks done
andreibade opened this issue Jan 26, 2025 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working tailwind

Comments

@andreibade
Copy link

Describe the bug

In tailwind v4, tailwind.config.ts got removed.

Sidebar components was modifying the tailwind.config.ts, but now because it doesn't exist anymore in v4, it returns ENOENT.

"ENOENT: no such file or directory, open 'tailwind.config.ts'"

Affected component/components

Sidebar

How to reproduce

  1. In a shadcn project, upgrade to tailwind v4 using pnpm dlx @tailwindcss/upgrade@next (https://tailwindcss.com/docs/upgrade-guide).

  2. Import sidebar component: pnpm dlx shadcn@latest add sidebar.

  3. Receive ENOENT error.

Codesandbox/StackBlitz link

Not needed, simple enough to reproduce.

Logs

➜ pnpm dlx shadcn@latest add sidebar

✔ Checking registry.
⠋ Updating tailwind.config.ts
Something went wrong. Please check the error below for more details.
If the problem persists, please open an issue on GitHub.

ENOENT: no such file or directory, open '/Users/abadescu/p/sealnext/frontend/tailwind.config.ts'

System Info

Doesn't matter, personally using macOS.

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@andreibade andreibade added the bug Something isn't working label Jan 26, 2025
@0a9ntg26
Copy link

0a9ntg26 commented Jan 26, 2025

you need to install TailwindCSS v3 with this command:

NPM

npm install -D tailwindcss@3 postcss autoprefixer

PNPM

pnpm add -D tailwindcss@3 postcss autoprefixer

BUN

bun add -D tailwindcss@3 postcss autoprefixer

YARN

yarn add -D tailwindcss@3 postcss autoprefixer

because shadcn/ui doesn't support TailwindCSS v4 for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tailwind
Projects
None yet
Development

No branches or pull requests

3 participants