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

shobhith's avatar

Im triying to deploy my site on forge but css not loading

Failed to load resource: net::ERR_CONNECTION_REFUSED localhost:5173/@vite/client:1 Failed to load resource: net::ERR_CONNECTION_REFUSED custom.css:1 Failed to load resource: net::ERR_CONNECTION_REFUSED localhost:5173/resources/js/app.js:1 Failed to load resource: net::ERR_CONNECTION_REFUSED

Its in Laravel 9 and PHP 8.1

0 likes
3 replies
Sinnbeck's avatar

Delete the hot file in the public directory

Be sure to knot upload this file when deploying. Its for dev only. On production you use npm run build

shobhith's avatar

@Sinnbeck hot folder is on git ignore, I'm not adding it.

also using npm run build. Below is my deployemeny script

cd /home/forge/hirepro.eyepreview.co.uk git pull origin $FORGE_SITE_BRANCH

php8.1 /usr/local/bin/composer2 install --no-interaction --prefer-dist --optimize-autoloader

echo "Building assets..." npm install npm run build

( flock -w 10 9 || exit 1 echo 'Restarting FPM...'; sudo -S service $FORGE_PHP_FPM reload ) 9>/tmp/fpmlock

if [ -f artisan ]; then $FORGE_PHP artisan migrate --force fi

Please or to participate in this conversation.