CSS and js do not load on the page

Website URL

http://william-dev.rf.gd/

Error Message

[::1]:5173/@vite/client:1 
           
            
           Failed to load resource: net::ERR_CONNECTION_REFUSEDUnderstand this error
app.css:1 
            
            
           Failed to load resource: net::ERR_CONNECTION_REFUSEDUnderstand this error
[::1]:5173/resources/js/app.js:1 
            
            
           Failed to load resource: net::ERR_CONNECTION_REFUSED

Other Information

Bom é uma aplicação laravel roda um tailwind mas no caso não esta sendo renderizada na pagina fiz uma gambiarra usando reprodução em CDN do tailwind quando você acessar a pagina vai parecer que não tem erro porque é uma aplicação simples mas eu preciso de mais amplitudo para em fim hospedar meu projeto como poderia fazer para corrigir estes erros?

TRANSLATED BY MOD

Well, it’s a laravel application that runs a tailwind but in case it’s not being rendered on the page I made a gambiarra using playback in CDN of tailwind when you access the page it will seem that there is no error because it is a simple application but I need more amplitude to finally host my project how could I do to fix these errors?

When I look at the generated HTML code of your website, I see the following line of code in it:

<script type="module" src="http://[::1]:5173/@vite/client"></script><link rel="stylesheet" href="http://[::1]:5173/resources/css/app.css" /><script type="module" src="http://[::1]:5173/resources/js/app.js"></script>

This is obviously not correct, it appears that the generated HTML is configured to download the files from a local NPM development server, not download it from your website.

I’m not completely sure how the URL handling works with Vite. But when preparing your website files to upload, please make sure to disable the NPM develpment server and run npm run build to compile the assets to upload.

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.