-
Notifications
You must be signed in to change notification settings - Fork 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
Tailwind Doesn't Generate Class #4602
Comments
Quick update, I tried adding My only workaround is turning off |
Hey @yagudaev. Please could you try using the latest canary build ( |
Maybe Tailwind only gets re-run when the CSS file is updated (Jekyll also has this issue). Could you try The solution for me is to always use custom classes and |
Maybe you have enable the JIT mode in your tailwind.config |
@bradlc Canary build seems to work so far with
@LoganDark There are no CSS files in the default template for next.js + tailwind (from the guide). I meant the CSS I can see in the browser in chrome dev tools, it doesn't have a
I used the default settings from the template in the guide, didn't play with them. Only commented out JIT when things didn't work. |
This is happening to me as well. Usually touching the tailwind.config.js file helps with the situations, other times it doesn't. |
@psousasingular after upgrading to canary I didn't have any issues. Except when I was trying to get another library to work and changed the Now I thought this wouldn't happen out in the wild. Using commonjs over esm style for config is a topic probably for another thread -- I admit I don't understand it deeply. Bottom line, do you think we should keep this bug open? Perhaps if it only happens when changing the tailwind config like adding new colors or something, you (@psousasingular) could create a new bug to help the maintainers avoid having the read the full thread here? If you are happy with that I can close this ticket (feel free to reference your new ticket here). |
hi. I can't add any feedback on the canary version because I'm using the forms plugin which has a dependency on tailwind v2. So, since I can't add anything on top of this, I think the ticket can be closed if it solved your case @yagudaev . I'm also using next 10, tailwindcss 2.1.4, postcss 8.2.9. Here's my tailwind.config.js
|
@psousasingular it should land in 2.2.0 so keep an eye out for that. You might need to fork these projects and upgrade the dependencies or use https://classic.yarnpkg.com/en/docs/selective-version-resolutions/ |
@psousasingular too late looks like Adam beat us :). 2.2.0 is out now: https://twitter.com/adamwathan/status/1405563122954481670 |
What version of Tailwind CSS are you using?
v2.1.4
What build tool (or framework if it abstracts the build tool) are you using?
Next.js 10.2.3
What version of Node.js are you using?
v16.3.0
What browser are you using?
Chrome
What operating system are you using?
macOS
Reproduction repository
https://github.com/yagudaev/tailwindcss-race-condition
Describe your issue
I started a new next.js project with tailwind css as described in: https://tailwindcss.com/docs/guides/nextjs. Only difference is I used
yarn create
instead ofnpx
.I then modified the content to eliminate everything but the title like so:
![Screen Shot 2021-06-09 at 12 22 17 PM](https://user-images.githubusercontent.com/1386966/121417166-72f82900-c91e-11eb-96d4-3f44293707cb.png)
Next, I went to add an underline class to the word "first". I saw no changes and verified the spelling. The class wasn't created.
Restarting the server wouldn't update it either.
Finally I read through the docs on underline and explicitly tried turning it on:
This did the trick.
I saw this: #4510.
The reproduction repo shows the above, however, if it is indeed a race condition it would be hard if not impossible to reliably reproduce. Best you (maintainers), can do is think of all the different systems involved and find a logical explanation. Once that happens, you can add code to mitigate the issue.
Hope this helps ❤️. Happy to answer any questions or try anything to make it work more reliably (I'll report back if I find more issues like this).
The text was updated successfully, but these errors were encountered: