-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Plugins no longer load when using Node 22.12.0 and 23.* #15374
Comments
Hey! Can you share a minimal reproduction repo so we can take a look? |
Here you go https://github.com/xt0rted-test/tailwind-plugins While setting that up I found a few more things:
|
I can confirm node 22.12 and node 23.4 broke my use of daisyui plugin. Reverting to node 22.11 solved it. |
This is where I was pointed to when I commented on the original PR that changed this flag nodejs/node#56155 (comment) |
I've tracked this down to an issue potentially with Jiti. The issue happens when a reproduction here: https://github.com/thecrypticace/node-22-jiti-bug I'm going to file a bug with Jiti and also see if I can track this down within Jiti itself Notes:
Jiti bug report: unjs/jiti#346 |
Because using Jiti alone doesn't appear to be broken I'd suggest renaming your config file to |
Fixes #15374 If we always use Jiti the problem should, in theory, go away (I hope). It does mean that loading configs is slower than it would be if they're written in CJS but 🤷♂️ Wanna get this running with the integration tests to see if anything breaks.
@thecrypticace v3.4.17 seems to be working with node 22.12.0 now, but I'll have to do a more in-depth test later to fully confirm. |
Thanks @thecrypticace for v3.4.17, confirm it working as well in my project, renamed |
@thecrypticace after more testing this looks to have fixed my issue |
What version of Tailwind CSS are you using?
v3.4.16
What build tool (or framework if it abstracts the build tool) are you using?
tailwind cli
What version of Node.js are you using?
v22.12.0
v23.*
What browser are you using?
N/A
What operating system are you using?
Windows
Reproduction URL
N/A
Describe your issue
It seems module resolution changed in Node 22.12.0 (as well as v23) and now tailwind no longer loads plugins. The only one I'm using is
@tailwindcss/forms
and with Node v22.11.0 it's included in the output, but with v22.12.0 or v23.* it's not.My
package.json
is set totype": "module"
and my config is namedtailwind.config.js
.I can resolve this issue two different ways:
Rename my config to use
.mjs
Pass the
--no-experimental-require-module
flag when calling tailwind like soNODE_OPTIONS=\"--no-experimental-require-module\" tailwindcss -i ./Styles/base.css --postcss -o ./wwwroot/css/site.css
ref: nodejs/node#55085
ref: nodejs/node#56155
The text was updated successfully, but these errors were encountered: