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

Mayaarjunan's avatar

Laravel 9 + React shown white page in docker

My Laravel 9 + React project shows an empty page on executing "npm run dev" in docker. When I tried the same project by installing it via composer (Not in docker) it works perfectly.

But in the docker, once I executed the below commands

sail artisan breeze: install react

npm run dev

the project shows an empty page

I am using Laravel Framework 9.31.0,PHP 8.1.10, and npm 8.19.2

0 likes
8 replies
Mayaarjunan's avatar
Mayaarjunan
OP
Best Answer
Level 1

@Sinnbeck configuration for the port is like below ports: - '${APP_PORT:-80}:80' - '${VITE_PORT:-5173}:${VITE_PORT:-5173}' Anyway I resolved the issue Here is how I executed the npm ./vendor/bin/sail npm run dev And Now I tried simply npm run dev Now it works!. Thank you for the response

Sinnbeck's avatar

Please set the thread as solved by marking a best answer

Please or to participate in this conversation.