-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Bug in latest release of Tailwind CSS #18807
-
What version of Tailwind CSS are you using?
tailwindcss 4.1.12
What build tool (or framework if it abstracts the build tool) are you using?
postcss 8.5.6, npm 11.5.2, Vite 7.1.2
What version of Node.js are you using?
v22.18.0
What browser are you using?
N/A
What operating system are you using?
Windows 11
Reproduction URL
You can find a minimal reproduction of this bug at the following public GitHub repository:
https://github.com/Dhanush-Annam/tailwind-bug-repo
Steps to Reproduce:
-
Clone the repository.
-
Run npm install on a Windows machine.
-
Observe that the installation completes successfully, but the node_modules.bin\tailwindcss executable is missing.
Describe your issue
Expected Behavior:
When running npm install -D tailwindcss, the installation should complete, and a tailwindcss executable file (e.g., tailwindcss.cmd) should be created inside the node_modules.bin directory, allowing npx tailwindcss to be used.
Actual Behavior:
The npm install command completes and reports success with no errors (e.g., added X packages, and audited Y packages... found 0 vulnerabilities). However, the node_modules.bin directory is not populated with the tailwindcss executable. This makes it impossible to run any npx tailwindcss commands, as the executable cannot be found.
This issue was confirmed through an extensive troubleshooting process with the following key findings:
The bug has been replicated on two different Windows laptops, confirming it is not a unique machine configuration issue.
Installing an older version, specifically tailwindcss@3.3.0, works correctly and the .bin executable is created as expected.
Installing other packages with executables (e.g., npm install -D vite) also works correctly, which proves that the npm client and the underlying system are functioning properly.
The evidence strongly suggests a bug exists in recent versions of the tailwindcss package that prevents the bin script from being properly linked during installation on Windows.
Beta Was this translation helpful? Give feedback.
All reactions
From v4, the tailwindcss
package no longer ships with an executable. The executable is now in a separate package, @tailwindcss/cli
. Since you are using Vite, you don't need the executable - see the installation documentation to integrate Tailwind CSS properly.
Replies: 3 comments 2 replies
-
From v4, the tailwindcss
package no longer ships with an executable. The executable is now in a separate package, @tailwindcss/cli
. Since you are using Vite, you don't need the executable - see the installation documentation to integrate Tailwind CSS properly.
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks @wongjn and @rozsazoltan for the clarification! 🙏
I now understand that starting with Tailwind CSS v4, the standalone CLI is no longer included in the main tailwindcss package and has been moved to @tailwindcss/cli. Since I’m using Vite, I don’t actually need the CLI — the integration works fine by following the Vite + Tailwind docs.
The CLI no longer has an init command, because tailwind.config.js is not required anymore. Configuration is now done directly in your CSS file. See the installation docs for details.
Everything is working now after adjusting my setup. I’ve also marked @wongjn’s reply as the answer since it directly explained the change in Tailwind v4. Thanks again for pointing me in the right direction!
Beta Was this translation helpful? Give feedback.
All reactions
-
🎉 1
-
This is still a bit wrong. Tailwind CSS v4' CLI does not have an init
command since we don't have a tailwind.config.js file to init. Everything is done in the CSS file.
Just take a look at the docs and pick your desired setup: https://tailwindcss.com/docs/installation
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Thanks for the correction @RobinMalfait 🙏 You’re right — in Tailwind v4 there’s no init command anymore since tailwind.config.js isn’t needed. I’ll update my earlier comment so it doesn’t confuse others. Appreciate the clarification!
Beta Was this translation helpful? Give feedback.