-
Notifications
You must be signed in to change notification settings - Fork 4.5k
All @tailwindcss/cli commands handing forever docker builds #17781
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
Comments
Ok, I'm working to narrow down the version this was introduced in and when I use 4.0.17 (
Then using 4.1.0, it hangs forever. |
Got a little curious, tried to repro:
I can't imagine this is actually docker-specific, but... seemingly doesn't repro under podman? Or maybe I'm not understanding the repro instructions. Weirdly, if I try to do
I can repro the build from the repro repo, though. I have a vague recollection that
|
Update - I tried this using v4.1.15 and still encountering the same issues. |
@thecrypticace sorry for the ping -- I see that you're active in the issues here. Have you seen this issue? It's been up for a couple weeks. My sense of this issue is that recent versions of tailwind have the CLI stall out with no error in extremely common build environments (darwin/arm64 and linux/arm64 on docker). If I am understanding the issue correctly, the impact would be that no one with what I think is a pretty standard CI pipeline can upgrade to these Tailwind versions and then deploy their code. Seems like it would be very bad for adoption. |
I haven't been able to reproduce these issues of the CLI hanging using the same docker environments on macOS (via Orbstack) or Windows (via Docker Desktop). I spent some time last week trying various configurations to reproduce things but haven't seen anything yet. I'm not sure what the big cause is right now. Obviously multiple people are seeing this but so far it's been completely unreproducible for me (or anyone else on the team). |
I have a 2021 Apple MacBook Pro with an Apple M1 Pro chip running macOS Sequoia (15.4.1). Docker is installed via Docker Desktop and For me, @ghmeier's repro repo triggers the issue immediately:
(I cancelled the run manually after 90 seconds). |
Ah okay you know what I think the repro I was testing was a different one because that one definitely hangs (well kinda). The CLI, because of it being run from the root, ends up scanning inside I suspect this has to do with recursive symlinks of some kind. I thought we handled those but maybe the files have weird path characteristics causing problems there. It appears that the But, generally, running the CLI from the root of a container seems like a pretty bad idea. A proper docker container setup is almost always going to have a folder or a mount containing the app / site / whatever. The CLI should be run from there otherwise automatic source detection will end up traversing way more than it should. It's like if you ran the CLI at I'll see if I can look into the symlink traversal behavior but the immediate "fix" is: run the CLI from a CWD that contains the sources you actually need to scan (e.g. not |
Ok, thanks for the update! It seems like using a subdirectory solved the issue. It'd be nice if there was a warning or error vs. radio silence. |
Yeah in this case it basically ends up in an infinite loop. I'll have to look into whether or not the JS event loop is event active while this is happening. (If it is then we should be able to output stuff, if not then we'd have to output stuff on the native side where we actually scan files). I know @RobinMalfait is working on improving the debugging of file scanning in #17906 which should (hopefully) help with things like this I think. |
What version of Tailwind CSS are you using?
v^4.1.0
What build tool (or framework if it abstracts the build tool) are you using?
Docker
What version of Node.js are you using?
v22.15.0
What browser are you using?
N/A
What operating system are you using?
darwin/arm64 and linux/arm64
Reproduction URL
https://github.com/ghmeier/tailwind-repro
The docker build hangs indefinitely when running:
Describe your issue
When running any tailwind while building docker containers for any architecture (the issue is reproducible when running
docker buildx build --platform linux/amd64
) any command that utilizes tailwind cli hangs. The repro case provided above is a minimal example where just runningnpx @tailwindcss/cli -v
hangs indefinitely, but this also happens when building css using the cli directly or via webpack. Running the same command on my M1 Macbook pro resolves correctly.Including
DEBUG=1
does not resolve the issue, the command doesn't output anything.The repro cases uses
node:22.15.0-alpine3.20
but I've yet to find a base image that solves the issue.I've looked through the couple of other issues and this looks most similar to #15730, but not quite the same.
The text was updated successfully, but these errors were encountered: