Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

C010UR's avatar
Level 1

Laravel 12 React Starter Kit styles not working

Hi, i tried to start a new project with Laravel react starter kit and got an issue. The tailwind styles don't work. Using CDN helps, but that's not a solution.

I ran:

laravel new app # React, Built-in auth, Pest, No for npm install && npm build
cd app
npm install && npm run build
composer run dev

Environment: Windows 11 with Debian WSL

The results are: https://drive.proton.me/urls/FQ6ZSZ0BE0#7SY7f4mN6HAx

I also tried to do the same with the Vue and Livewire Starter Kits, and they worked fine.

Maybe somebody knows how to fix this issue?

1 like
6 replies
vincent15000's avatar

I just installed a new project with the React start kit and it works fine.

Checked with composer run dev and php artisan serve.

On which OS are you working ?

C010UR's avatar
Level 1

@vincent15000 Okay i tried to use sail and it works now. Kinda interested now why tailwind 4 doesn't work in WSL, but i guess the issue is solved

1 like
sctaix's avatar

@C010UR

Hello, I’m experiencing the same issue in Laravel 12. How did you resolve it? My environment is Windows11 + Laravel Herd + Starterkit with Livewire.

laracasts.com/discuss/channels/laravel/laravel-12-flux-css-not-included-right-after-clean-install?page=1&replyId=961277

1 like
Xinecraft's avatar

Are you initializing git repo or not?

Idk why, This issue happening to me in Herd with React Starter Kit if I don't initialize git repo. But if I do git init then build the issue get fixed.

3 likes
marcos-aparicio's avatar

@Xinecraft I had the same issue when installing another starter kit. Perhaps my solution is very specific but the issue in my case was that I had a git repo in my home directory and with that I also had a .gitignore file with some rules that made the vite compilation step for some reason fail. Clearing those .gitignore rules made the problem go away. I don't know the exact reason that caused it but maybe if your project is inside a git repo(even if it is ignored by the repo), clearing some rules or moving the project outside a repo might solve the issue.

2 likes

Please or to participate in this conversation.