gregsullivan/_tw

Rebuilding Warnings/Errors

Closed this issue · 2 comments

After running 'npm run dev', 'npm run watch' or 'npm run bundle', we're getting the following rebuilding warnings/errors:

Rebuilding...
(node:30073) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use node --trace-warnings ... to show where the warning was created)

Rebuilding...
(node:30177) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use node --trace-warnings ... to show where the warning was created)

Rebuilding...
(node:30173) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use node --trace-warnings ... to show where the warning was created)

Hello—Thanks for posting this!

Are you getting these errors from a freshly generated theme, or have you modified it? Are you able to provide a copy of your repository? (I haven't seen these errors to date.)

These warnings were caused by importing Fluid for Tailwind CSS with this line:

import fluid, { extract } from 'fluid-tailwind'

They're only triggered in node v22; in the LTS version, the warnings aren't present.

There's some discussion of this issue in the remix-run repository:

remix-run/remix#9461

That issue links to this nodejs/node issue discussing the breaking change, which may or may not be reverted in the future:

nodejs/node#53097

Since this issue hasn't reached an active LTS version of Node.js, and since it's related to a third-party plugin, I'm going to close this for now. Please feel free to reopen if you encounter any further issues!