DEV Community

Discussion on: How to set up tailwindcss with create-react-app + jit feature

Collapse
 
pak11273 profile image
Isaac Pak

I get error:

Error: PostCSS plugin tailwindcss requires PostCSS 8.
Migration guide for end-users:
github.com/postcss/postcss/wiki/Po...

Collapse
 
akov profile image
Ako

probably you have not appended @latest at the end of packages. reinstall them with this exact command:
npm install -D tailwindcss@latest postcss@latest postcss-cli@latest autoprefixer@latest

Collapse
 
pak11273 profile image
Isaac Pak

I copy/pasted everything. It would be nice if you had an example repo where we could just clone/install and ensure that it works.

Thread Thread
 
akov profile image
Ako

Oh! Sorry, I didn't think it would be necessary. here it is:
github.com/ako-v/cra-tailwind-jit
I will also add it into the post itself.

Thread Thread
 
pak11273 profile image
Isaac Pak • Edited

Thanks for adding the repo! It's working now but I for me I had to install postcss@latest and I also had to add start": "react-scripts start back into package.json file. Kudos!

Collapse
 
akov profile image
Ako

I also realized the postcss package is not necessary at all, the postcss-cli is enough.