-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
[v4] Angular compilation errors in Docker are preventing TailwindCSS from working. #16364
Comments
Seeing this too but not on every build... |
I have the same issue, any idea on how to fix this, or what causes this issue? |
I’m experiencing the same issue with Angular 19 and Tailwind v4. When running Tailwind inside Docker, the generated CSS file contains some malformed classes, including one with a As a temporary workaround, I’m using the following commands before RUN npx @tailwindcss/cli -i src/styles/tailwind.css -o src/styles/tailwind.css
RUN sed -i 's/uri: \/hoge\/\*/uri: ""/g' src/styles/tailwind.css
RUN npm run build Has anyone found a better solution? |
Same issue here. I did find my own workaround, maybe this can be of use for others struggling with this while there is no real solution. ...
COPY package*.json ./
RUN npm ci
# temporary workaround to prevent parsing of unwanted files by tailwind
RUN find node_modules -path '*/needle/test/files/*' -delete
COPY . .
RUN npm run build
... I believe this to be a bug in tailwind, but I didn't go code-diving to be certain of this. What I found out about this issue: |
Just ran into this as well. @hironized your workaround worked for me. Thanks. |
Same problem here, for me the problem was in the same file @hironized mentioned and a few |
What version of Tailwind CSS are you using?
TailwindCSS v4.0
What build tool (or framework if it abstracts the build tool) are you using?
What version of Node.js are you using?
Node:22-alpine (Docker image)
What browser are you using?
Chrome
What operating system are you using?
Windows 11 Pro 64-bit
Reproduction URL
https://github.com/johnadrian63/tailwind-docker
Describe your issue
I have an Angular application that uses TailwindCSS v4. It works perfectly on my local machine, but when I run it inside a Docker container, I encounter compilation errors that prevent TailwindCSS from functioning properly.
Describe the problem you're seeing, any important steps to reproduce and what behavior you expect instead.
Here is the compilation errors that I encountered:
Steps to reproduce:
docker build -t docker-test5-webclient-app -f ${PWD}/webclient/projects/webapp/Dockerfile .
docker run --name docker-test5-webclient-app --env-file ./webclient/config/.env -d -p 8080:4200 -v ${PWD}/webclient/projects/webapp:/app/projects/webapp docker-test5-webclient-app
Here is the content of my Dockerfile:
The text was updated successfully, but these errors were encountered: