Skip to content
Nilay Kabariya

Home · Topic · 3 entries

Tailwind CSS v4 not working? Upgrade errors fixed

Tailwind CSS v4 moved the CLI, the PostCSS plugin and the configuration into new places, so commands and setups that worked on v3 now fail with errors that older answers do not cover. Every entry below was reproduced on a fresh v4 project, with the fix run and verified.

Entries

  1. No.017

    Failed to load PostCSS config in Vite (and the Tailwind v4 error)

    Vite can't load your PostCSS config, or Tailwind says to use @tailwindcss/postcss. The causes, how to tell them apart, and the tested fix for each.

    > [plugin vite:css] C:/project/src/style.css

    FIXED6 min
  2. No.008

    Cannot apply unknown utility class border-border in Tailwind v4

    Three causes trigger this Tailwind v4 error, each with its own fix: custom colours, CSS modules and Vue/Svelte styles, and v3 classes. All reproduced.

    > Error: Cannot apply unknown utility class `border-border`

    FIXED3 min
  3. No.007

    npx tailwindcss init: "could not determine executable to run"

    npx tailwindcss init fails on a fresh install. Why Tailwind v4 does this, two fixes that work, and the command that fails silently. Reproduced.

    > $ npx tailwindcss init

    FIXED2 min

Post card · Every Sunday

What broke this week.

One email on Sundays: the Node, TypeScript, Python and AI SDK releases that broke builds that week, each one reproduced, with a link to the fix that worked. Never shared, and you can leave any time.

— Nilay

or follow by RSSor on X

By subscribing you agree to the privacy note. One click to leave.

tip: paste the exact error text