DEV Community

Discussion on: How to install Tailwind CSS 2 with Laravel 8

Collapse
 
sluxzer profile image
sluxzer

Hey there

trying to run without laravel-mix 6:

npm install tailwindcss@latest postcss@latest autoprefixer@latest
Enter fullscreen mode Exit fullscreen mode

i got this result:

ERROR in ./resources/css/app.css
Module build failed (from ./node_modules/css-loader/index.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: PostCSS plugin tailwindcss requires PostCSS 8.
Migration guide for end-users:
https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users
Enter fullscreen mode Exit fullscreen mode

my machine:

laravel 8.15.0 with jetsream inertia (vue.js)
Enter fullscreen mode Exit fullscreen mode

Is laravel-mix 6 is a must? because you mention it only as "suggestion"

Thanks

Collapse
 
robertobutti profile image
Roberto B.

I applied the command i suggested in the posts on projects with: Laravel 8 + Livewire + Tailwindcss2 (Jetstream)

I never tried with Vue.js
I will try it