← All fixes
Tailwind v4: trying to use tailwindcss directly as a PostCSS plugin
#121Error
[postcss] It looks like you're trying to use `tailwindcss` directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install `@tailwindcss/postcss` and update your PostCSS configuration.
Why it happens, and why this works
Tailwind CSS v4 moved its PostCSS plugin into @tailwindcss/postcss. A v3-style postcss.config (plugins: { tailwindcss: {} }) with v4 installed triggers this.
Fix
With Vite, the simplest is the Vite plugin: npm i -D tailwindcss @tailwindcss/vite, add tailwindcss() to plugins in vite.config, delete postcss.config, and put @import "tailwindcss"; in your CSS. Otherwise npm i -D @tailwindcss/postcss and use plugins: { "@tailwindcss/postcss": {} }. Or pin tailwindcss@3 if you want to stay on v3 config.Did it work?
No reports yet0 worked0 didn't
Tried it yourself?
Related fixes
ERR_PACKAGE_PATH_NOT_EXPORTED when importing a file deep inside a package
#29Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/helper' is not defined by "exports" in /app/node_modules/mylib/package.json
Tailwind classes not applying after upgrading to Tailwind CSS v4
#166Tailwind CSS v4: no styles generated / utility classes have no effect after upgrade
Tailwind classes not applied (no styles at all, or only some classes work)
#145Tailwind CSS utility classes have no effect; page renders unstyled or classes built from strings are missing in production