Dafault Css/Tailwind Not working in production
So guys, i'm pretty desperate. I'm using Laravel API and Filament for my backend. Actually as "views" i only have filament working, laravel is totally empy (using it just for API). When i'm doin the deploy and open it on the ip address all the styles are actually gone... what can i do about it? I've almost tried anything and no documentation talk about this (except for custom theme THAT IS NOT my case), PLS HELP!!!
11 Replies
First: Check your DevTools.
Any errors (console)?
Any stylesheets not loaded (network)?
in the console is everything red of course... a lot of these "forms.css:1
Failed to load resource: the server responded with a status of 502 (Bad Gateway)" A lot of these as well "module.esm.js:553 Alpine Expression Error" and other errors like these "Uncaught TypeError: Cannot read properties of undefined (reading 'isOpen')" (due to alpine and tailwind error i supposed) Any clue?
Failed to load resource: the server responded with a status of 502 (Bad Gateway)" A lot of these as well "module.esm.js:553 Alpine Expression Error" and other errors like these "Uncaught TypeError: Cannot read properties of undefined (reading 'isOpen')" (due to alpine and tailwind error i supposed) Any clue?
Failed to load resource: the server responded with a status of 502 (Bad Gateway)"Well, if the resources aren't delivered by the server I'd check the server configuration. But hard to help with any info about the server and config.
i'll take a look but... i have the "typed content", i just don't have the style and the js... what can be wrong so?
502 Bad Gateway sounds like a misconfiguration for static files
i created my .conf file using the one on laravel... any ideas where i can find a better one? Cause mine is actually this:
Not sure. But what's running on
proxy_pass http://127.0.0.1:8000;
?I've just changed that... but nothing happened... i really think it's not loading style or even nor alpine and js
Do i have to put anything into the AppServiceProvider? Or into the AdminPanelProvider? I really have no clue....
and what about ->viteTheme()? Even if i don't have any custom theme
I've just found this, i'm gonna read it even if it's filament 2.x
https://v2.filamentphp.com/tricks/fix-filament-assets-nginx
Filament
Fix Filament assets not loading in Nginx by Ida Bagus Gede Pramana ...
Filament is a collection of tools for rapidly building beautiful TALL stack apps, designed for humans.
I've tried to add this but didnt work...
Don’t think it’s related to your app because that’s a server error coming from nginx.
And the assets shouldn’t be server by PHP