[v4]Can't resolve 'tailwindcss' in... #16661
-
v4.0.6 Followed 1:1 installation process from Tailwind official documentation.(https://tailwindcss.com/docs/installation/framework-guides/laravel/vite) results in error: [plugin:@tailwindcss/vite:generate:serve] I cant upload video here looks so, as I recorded from start of new laravel application till the error. I have uploaded it to Dropbox for clarity. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hey! So it seems that the Laravel installer already adds Tailwind CSS for you, but it adds v3 and not v4 so now even though you have added the Vite plugin for Tailwind CSS v4, the To fix this:
Laravel was already updated to install Tailwind CSS v4 out of the box: laravel/laravel#6523 so I'm not sure why this didn't apply for you. My guess is that your laravel version might be out of date? |
Beta Was this translation helpful? Give feedback.
-
Getting same issue here - installing through Herd - says its all updated but its still installing Tailwind v3 |
Beta Was this translation helpful? Give feedback.
Hey! So it seems that the Laravel installer already adds Tailwind CSS for you, but it adds v3 and not v4 so now even though you have added the Vite plugin for Tailwind CSS v4, the
tailwindcss
package is still at v3.To fix this:
tailwindcss
to v4:npm install tailwindcss@latest
postcss.config.js
) - This is how tailwind was added in v3!Laravel was already updated to install Tailwind CSS v4 out of the box: laravel/laravel#6523 so I'm not sure why this didn't apply for you. My guess is that your laravel version might be out of date?