#CSS not working in production

36 messages · Page 1 of 1 (latest)

fierce kraken
#

I've tried running npm run prod or whatever its called from my server and it said its built my items, but the css isnt linking. this is how i link my css

#

its got absolutely no css

nocturne mica
#

So, what is happening? Is your CSS file loading? Is it empty? Is it a 404?

fierce kraken
nocturne mica
#

Look at your browser's devtools

fierce kraken
#

idk if this is where u want me to look but

#

i guess this is the issue?

#

i think its because there isnt an .env file

#

wait there is

#

i just couldnt see it on the dashboard

#

is the app_url correct?

nocturne mica
#

Laravel detects the Vite dev server is running, which is either because it's running or you did something like copying your local files to a server while the Vite server is running. So, check if the /public/hot file exists

fierce kraken
#

its meant to be in production

#

idk if im meant to use the dev server, i've built the css files to a file

nocturne mica
#

No, you shouldn't use the Vite dev server on a production environment

fierce kraken
#

yeah, i understand that

#

but im meant to be in prod mode

#

so shouldnt it be accessing the built css?

nocturne mica
#

I just explained..

fierce kraken
#

how can i stop the dev server, then?

#

im using plesk

nocturne mica
#

Idk, I don't use Plesk. Why did you start the dev server on your production server in the first place?

fierce kraken
#

also, public/hot doesnt exisst

nocturne mica
#

Guess it is then? Then I guess use htop or something to figure out which processes are running, or even check if something is running internally on port 5175, if it is kill the process

fierce kraken
#

how can i check this? via ssh or something?

nocturne mica
#

Idk, I'm giving you lots of things to search for. No clue what Plesk is, just the what you're showing is indicative of the dev server running. Laravel would only try to load from the dev server it's running, and it detects this through the hot file, not through env or config.

fierce kraken
nocturne mica
#

Ok guess you're out of luck then 🤷‍♂️

fierce kraken
#

great thanks

nocturne mica
fierce kraken