Skip to content

fix(styles): resolve daisyUI 5 + Tailwind 3 conflict that crashes CSS#219

Open
evan188199-tech wants to merge 1 commit into
Snouzy:mainfrom
evan188199-tech:fix/css-daisyui-tailwind-conflict
Open

fix(styles): resolve daisyUI 5 + Tailwind 3 conflict that crashes CSS#219
evan188199-tech wants to merge 1 commit into
Snouzy:mainfrom
evan188199-tech:fix/css-daisyui-tailwind-conflict

Conversation

@evan188199-tech

Copy link
Copy Markdown

What

pnpm dev / next build crashes on every page with TypeError: adapterFn is not a function, and Next.js's retry loop can fork-bomb the machine (1000+ node processes, multi-GB memory).

Why

This is an incomplete Tailwind v4 migration. The CSS was updated to use @plugin \"daisyui\" (v4 syntax) but the dependencies and config were left on v3. daisyUI was bumped to v5 — which dropped Tailwind v3 support — while tailwindcss stayed at ^3.4.13. Loading daisyUI 5 via the v3 require(\"daisyui\") pattern returns a v4 options-function instead of a v3 plugin object.

Changes

Take the minimal path (Option B from #215) instead of a full v4 migration:

  • daisyui^4.12.10 (v4 line, last version compatible with Tailwind v3). Lockfile resolved to 4.12.24.
  • Remove the no-op v4 @plugin \"daisyui\" directive from globals.css — it has no effect under Tailwind v3 anyway.
  • tailwind.config.ts already loads daisyUI via plugins: [require(\"daisyui\")], so no config change is needed.
  • pnpm-lock.yaml updated via pnpm install --lockfile-only.

This keeps the change small and reviewable. An alternative full Tailwind v4 migration exists in #216 if the maintainer prefers that direction instead.

Fixes #215.

daisyUI was bumped to v5 (which targets Tailwind v4) while the project
stayed on Tailwind v3. Loading daisyUI 5 via the v3 `require("daisyui")`
pattern returns a v4 options-function instead of a v3 plugin object,
raising `TypeError: adapterFn is not a function` on every CSS compile.
Next.js then retries the failed compile by spawning worker processes,
which can fork-bomb the machine.

Take the minimal path (Option B from Snouzy#215): downgrade daisyUI to v4.x
(the last line compatible with Tailwind v3) and remove the no-op v4
`@plugin "daisyui"` directive from globals.css. Tailwind v3 and
`tailwind.config.ts` keep loading daisyUI via `plugins: [require("daisyui")]`.

Fixes Snouzy#215
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Workoutcool Team Team on Vercel.

A member of the Team first needs to authorize it.

@evan188199-tech

Copy link
Copy Markdown
Author

此 PR 由 GLM-5.2 修复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: daisyUI 5 + Tailwind 3 conflict causes CSS crash and memory blowup

1 participant