@tailwindcss/cli produces corrupted and incomplete css #16710
Unanswered
sschafercdd
asked this question in
Help
Replies: 1 comment 1 reply
-
Hey! Mind sharing a repro for that? The input CSS is Tailwind CSS v3 code and you mentioned you're using Tailwind CSS v4 so you might also want take a look at the upgrade guide: https://tailwindcss.com/docs/upgrade-guide |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What version of Tailwind CSS are you using?
4.0.7
What build tool (or framework if it abstracts the build tool) are you using?
Just the cli:
npx @tailwindcss/cli -i app/assets/stylesheets/tailwind_decl.css -o app/assets/stylesheets/tailwind.css
What version of Node.js are you using?
v20.18.2
What browser are you using?
n/a
What operating system are you using?
OS X
Reproduction URL
The file app/assets/stylesheets/tailwind_decl.css contains the following:
The output is both invalid CSS AND is missing expected classes like
rounded-xs
.The mini-css-extract-plugin chokes on this file, specifically the line:
.[c:0]:[nX2;!$(n1nnnc1):1]:[nX2:2]:[nX3;H:3]:[nX2:4] {
2025-02-20 20:29:02 ERROR in ./app/assets/stylesheets/tailwind.css
2025-02-20 20:29:02 Module build failed (from ./node_modules/.pnpm/mini-css-extract-plugin@1.6.2_webpack@5.97.1/node_modules/mini-css-extract-plugin/dist/loader.js):
2025-02-20 20:29:02 ModuleBuildError: Module build failed (from ./node_modules/.pnpm/postcss-loader@7.3.4_postcss@8.5.1_typescript@4.9.5_webpack@5.97.1/node_modules/postcss-loader/dist/cjs.js):
2025-02-20 20:29:02 Error: Expected a backslash preceding the semicolon.
2025-02-20 20:29:02 at /tmp/src/app/assets/stylesheets/tailwind.css:2037:1
A reproduction is required when filing an issue — any issue opened without a reproduction will be closed and you'll be asked to create a new issue that includes a reproduction. We're a small team and we can't keep up with the volume of issues we receive if we need to reproduce each issue from scratch ourselves.
Describe your issue
Describe the problem you're seeing, any important steps to reproduce and what behavior you expect instead.
Beta Was this translation helpful? Give feedback.
All reactions