It looks like you're trying to use tailwindcss directly as a PostCSS plugin
Last verified:
The fix
It looks like you're trying to use `tailwindcss` directly as a PostCSS plugin. Tailwind v4 moved that plugin to `@tailwindcss/postcss`. Point PostCSS at that package, or stay on Tailwind v3 on purpose.
- 1
Stay on v3 if the project is a v3 setup
If
tailwind.config.jsand@tailwind baseare what this app uses, pintailwindcss@3and leave the PostCSS plugin astailwindcss. Do not install@tailwindcss/postcssbeside a v3 config. Do not run the v4 upgrade by only changing the version number. - 2
On v4 with PostCSS, switch the plugin
Install
tailwindcss,@tailwindcss/postcss, andpostcss. Inpostcss.config.mjs, the plugin key is@tailwindcss/postcss. Remove thetailwindcsskey. You can removeautoprefixerandpostcss-importfrom that file. In the CSS entry, replace the three@tailwindlines with@import "tailwindcss".export default { plugins: { "@tailwindcss/postcss": {}, }, }; - 3
On Vite, use the Vite plugin if you are dropping PostCSS
Lovable and Bolt are Vite. Install
tailwindcssand@tailwindcss/vite, add the plugin invite.config, and delete the PostCSS config'stailwindcssentry so nothing still loads the old plugin. Keep@import "tailwindcss"in the CSS. Do not register both the Vite plugin andtailwindcssas a PostCSS plugin. - 4
Reinstall, then rebuild
A lockfile that still resolves Tailwind v3 while
package.jsonsays v4, or the reverse, failsnpm cilater. Run the install so the lock matches, and commit both files. Restart the dev server. A class that is missing from a successful build is the scanner page, not this one.
Why it happens
Tailwind v3 was itself a PostCSS plugin, so postcss.config listed tailwindcss: {}. Tailwind v4 split that plugin into @tailwindcss/postcss. Loading tailwindcss from PostCSS throws the sentence in the title: the PostCSS plugin has moved to @tailwindcss/postcss, and the config still has to be updated to that package.
An AI bump of tailwindcss to v4 leaves the v3 config in place, and the next next dev, Vite build, or Vercel build dies on that line. v4 also replaces @tailwind base, @tailwind components, and @tailwind utilities with @import "tailwindcss". autoprefixer and postcss-import are not required for that pipeline. A Vite app can load Tailwind with @tailwindcss/vite and delete the PostCSS entry instead. Classes that never appear in the CSS, with a build that succeeds, are the other Tailwind page.
The next error you'll probably hit
Once this is fixed, the usual follow-up is Tailwind class not applying. Tailwind class not applying: that utility was never generated. Tailwind only ships complete class names written in source. Do not concatenate the name.
Prompt to paste back into your AI tool
Paste this above the error.
The build throws: It looks like you're trying to use `tailwindcss` directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package. package.json has tailwindcss@<version>. The PostCSS config lists <plugins>. The app is <Next.js or Vite>. Do not install both tailwindcss as a PostCSS plugin and @tailwindcss/postcss. Do not delete every CSS file. Do not add --legacy-peer-deps for this message. 1. If we are staying on Tailwind v3, pin tailwindcss@3 and keep the existing PostCSS plugin. Stop there. 2. If we are on v4 and Next.js, install @tailwindcss/postcss and set that as the only Tailwind plugin in postcss.config.mjs. Replace @tailwind lines with @import "tailwindcss". 3. If we are on v4 and Vite, use @tailwindcss/vite and remove the tailwindcss PostCSS plugin. 4. Update the lockfile with the install. Show only those config files.
Common questions
+I installed @tailwindcss/postcss and the same sentence is still there. Why?
PostCSS is still loading the tailwindcss package. The config key has to be @tailwindcss/postcss, and the tailwindcss key has to be gone. A second config file, or the Vite config requiring tailwindcss as PostCSS, keeps the old plugin.
+Can I keep @tailwind base with Tailwind v4?
No. v4's CSS entry is @import "tailwindcss". The three @tailwind directives belong to v3. Pin v3 if you are not changing the CSS entry.
Related errors
- Tailwind class not applyingTailwind class not applying: that utility was never generated. Tailwind only ships complete class names written in source. Do not concatenate the name.CursorLovableBoltTailwindViteOct 14, 2026
- Lovable app not deploying: read the bannerLovable app not deploying: the Publish dialog says Build errors need fixing or Publishing failed. Match that sentence, fix that cause, and publish again.LovableCursorViteSupabaseNov 2, 2026
- Treating warnings as errors because process.env.CI = trueThe Vercel build log says Create React App is failing on warnings because CI is true. A Next.js log that says Failed to compile with a type error is a different check.Cursorv0BoltVercelReactOct 27, 2026
- npm error ERESOLVE unable to resolve dependency treenpm error ERESOLVE unable to resolve dependency tree. Install a version whose peer matches this app. Do not start with --legacy-peer-deps.CursorLovableBoltNodeReactNov 4, 2026