Skip to content

Module build failed (from ./node_modules/postcss-loader/dist/cjs.js): Error: 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. #16828

Answered by wongjn
GuillaumeRZ asked this question in Help
Discussion options

You must be logged in to vote

react-scripts is causing the error by including the incorrect tailwindcss PostCSS plugin in its pipeline. You could look at:

  • Ejecting the configuration to substitute tailwindcss for @tailwindcss/postcss in its Webpack configuration.
  • Using CRACO to substitute tailwindcss for @tailwindcss/postcss in its Webpack configuration.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by GuillaumeRZ
Comment options

You must be logged in to vote
1 reply
@wongjn
Comment options

wongjn Feb 27, 2025
Collaborator

Comment options

You must be logged in to vote
1 reply
@wongjn
Comment options

wongjn Mar 16, 2025
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants