next.js
2e04c974 - Pin Tailwind to 4.3.3 in create-next-app (#101061)

Commit
10 days ago
Pin Tailwind to 4.3.3 in create-next-app (#101061) ## Summary New `create-next-app` projects that use Tailwind currently fail to build on Node.js versions that can't `require()` ES modules: before 20.19, and 22.0–22.11. That range includes Next.js's minimum supported version, 20.9.0: ``` ./app/globals.css Error: require() of ES Module …/node_modules/magic-string/dist/index.mjs not supported. at …/node_modules/@tailwindcss/node/dist/index.js at …/node_modules/@tailwindcss/turbopack/dist/index.js ``` `@tailwindcss/node@4.3.4`, published 2026-11-02 at 21:36 UTC, moved from `magic-string@^0.30.21` to `magic-string@^1.1.0`. magic-string 1.x is ESM-only, but Tailwind's CommonJS build still `require()`s it. The template's `^4` ranges pick up the new version. Since then, every Tailwind create-next-app test in the Node 20.9.0 jobs has failed on canary and on the PR runs checked: turbopack production, turbopack dev and cache components dev. That includes the run that blamed f699e1093d. This temporarily pins `tailwindcss` and the Tailwind bundler plugin (`@tailwindcss/turbopack` or `@tailwindcss/postcss`) to `4.3.3`. That version's `@tailwindcss/node` still depends on `magic-string@^0.30.21`. Restore `^4` once Tailwind ships a fix. ## Verification - Reproduced the failure locally: on Node 20.20.2 with `--no-experimental-require-module`, `require()` of a package shaped like `magic-string@1.4.5` throws the same `ERR_REQUIRE_ESM`. - Not run locally: the create-next-app tests, because the sandbox can't reach the npm registry. CI on this PR runs them. <!-- NEXT_JS_LLM -->
Author
Parents
Loading