PostCSS error: [object Object] is not a PostCSS plugin

@rizkit - I found the fix and it's simple. Just run npm i -d postcss and the problem is solved.

Basically, you need both gulp-postcss and postcss plugins in your dependencies for this to work correctly. I'm assuming the gulp-postcss plugin will need to update the postcss package reference in the project to fix it properly, so we only need to include gulp-postcss in the future.

Tailwindcss & React issue

For anyone facing the above issue while setting up a react project with tailwindcss, running npm i postcss -D worked for me.

You are using the gulp-autoprefixer package. That's simply a wrapper around the original autoprefixer package that turns it into a gulp plugin, so you can do .pipe(autoprefixer()).

However postcss expects the original package itself, not the gulp plugin.

So instead of this:

autoprefixer = require('gulp-autoprefixer'),

You need to install the autoprefixer package and do this:

autoprefixer = require('autoprefixer'),