fix: Upgrade tailwindcss to 3.4.17 to fix Node.js 22.12+ compatibility#5238
Closed
benceruleanlu wants to merge 1 commit intomainfrom
Closed
fix: Upgrade tailwindcss to 3.4.17 to fix Node.js 22.12+ compatibility#5238benceruleanlu wants to merge 1 commit intomainfrom
benceruleanlu wants to merge 1 commit intomainfrom
Conversation
Fixed PostCSS build error "Cannot read properties of undefined (reading 'call')" that occurred with tailwindcss 3.4.4 when using Node.js 22.12+. The issue was caused by Node.js module resolution changes that broke plugin loading. Tailwind CSS 3.4.17 includes a workaround that always uses jiti for config loading to ensure consistent module resolution. Refs: tailwindlabs/tailwindcss#15374, tailwindlabs/tailwindcss#15421 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🎭 Playwright Test Results✅ All tests passed across all browsers! ⏰ Completed at: 08/28/2025, 06:08:21 AM UTC 📊 Test Reports by Browser
🎉 Your tests are passing across all browsers! |
| Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Contributor
| I think I'd rather we set the minimum node version to 24, and hopefully get rid of the tailwind config with the v4 upgrade. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades tailwindcss from 3.4.4 to 3.4.17 to fix a critical build error that occurs with Node.js 22.12+ and 23.x:
Root Cause Analysis
The Bug Chain
Node.js 22.12 introduced native
require(esm)supportmodule: unflag --experimental-require-module nodejs/node#55085
Our commit 7d6e252 triggered the issue by changing:
The exact failure path in our codebase:
require('./tailwind.config.js')require(esm)customIconCollection.tswhich usesimport.meta.url(ESM-only)require.cacheCache poisoning causes the actual error:
require.cacheand finds the poisoned entries@iconify/tailwindmodule is returned as{}instead of the actual moduleaddDynamicIconSelectors({})tries to call an empty objectThe Fix
Tailwind CSS 3.4.17 includes a workaround that forces jiti to always handle config loading, completely bypassing Node's problematic
require(esm)attempt. This prevents the cache poisoning issue entirely.Related Issues & PRs
require(esm)call fails unjs/jiti#346 - Cache poisoning bug in jitiImpact
This upgrade is required for compatibility with:
Without this fix, the build fails completely when using Tailwind plugins with these Node versions.
┆Issue is synchronized with this Notion page by Unito