Skip to content

[v4]Can't resolve 'tailwindcss' in... #16661

Answered by philipp-spiess
nezaboravi asked this question in Help
Discussion options

You must be logged in to vote

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:

  • Update tailwindcss to v4: npm install tailwindcss@latest
  • Remove the postcss configuration file (postcss.config.js) - This is how tailwind was added in v3!
  • Remove the tailwind JavaScript configuration file.

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?

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@theleally
Comment options

@sntanju
Comment options

@armaan-yadav
Comment options

@1803053530
Comment options

@peterho77
Comment options

Answer selected by nezaboravi
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
9 participants
Converted from issue

This discussion was converted from issue #16657 on February 19, 2025 13:49.