Error: PostCSS plugin autoprefixer requires PostCSS 8. Update PostCSS or downgrade this plugin
Quick fix
Downgrade your autoprefixer to version 9, use
"autoprefixer": "^9.0.0"
in your dev dependencies.
More details
PostCSS was updated to version 8, however, PostCSS CLI has not yet been updated to handle PostCSS plugins which use the new PostCSS 8+ API. Autoprefixer uses the new PostCSS 8 API since version 10.
This is documented under known issues in the PostCSS GitHub page.
Once PostCSS CLI is updated to handle plugins that use the new PostCSS 8+ API, this will likely not be an issue. But until then, you may need to downgrade some PostCSS plugins to avoid errors.
I am not sure about this but can you try installing postcss as a dependency?
npm i postcss
If you're having this problem and you're using Tailwind CSS v2, try this
npm uninstall tailwindcss postcss autoprefixer
npm install tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9
source: https://tailwindcss.com/docs/installation#post-css-7-compatibility-build