Tailwind CSS v4: Use @tailwindcss/postcss instead of tailwindcss in PostCSS configuration
Error: It looks like you're trying to use `tailwindcss` directly as a PostCSS plugin in v4. You need to install `@tailwindcss/postcss` instead.
Immediate Remediation
javascript
# 1. Install official PostCSS plugin for v4:
pnpm add -D @tailwindcss/postcss
// 2. In postcss.config.mjs:
export default {
plugins: {
'@tailwindcss/postcss': {},
},
};Root Cause Analysis
In Tailwind v4, the core compiler is separate from PostCSS. The legacy "tailwindcss" PostCSS export was extracted into the standalone "@tailwindcss/postcss" package.
Verification & Guardrails
- Ensure autoprefixer is removed if using @tailwindcss/postcss, as v4 includes built-in prefixing.
- Restart dev server after updating postcss.config.mjs.
Have a custom or uncategorized crash?
Run your trace through our in-memory client privacy sandbox for instant SRE remediation.