navneet's avatar

Error ERR_CONNECTION_TIMED_OUT on vite app running on AWS elastic beanstalk

I just moved from Webpack to Vite. On local, the app is working fine but when I deploy it to my AWS Elastic Beanstalk server, it shows errors like these on the Chrome console:

GET https://mysite.us-west-1.elasticbeanstalk.com/css/filament/forms/forms.css?v=3.1.26.0 net::ERR_CONNECTION_TIMED_OUT
        
GET https:/mysite.us-west-1.elasticbeanstalk.com/css/filament/support/support.css?v=3.1.26.0 net::ERR_CONNECTION_TIMED_OUT
        
GET https://mysite.us-west-1.elasticbeanstalk.com/build/assets/app-53465a43.css net::ERR_CONNECTION_TIMED_OUT

My vite config is :

import { defineConfig } from 'vite';
import laravel, { refreshPaths } from 'laravel-vite-plugin'

export default defineConfig({
    plugins: [
        laravel({
            input: [
                'resources/css/app.css',
                'resources/js/app.js',
                'resources/css/filament/app/theme.css'
            ],
            refresh: [
                ...refreshPaths,
                'app/Livewire/**',
            ],
        }),
    ],
    resolve: {
        alias: {
            '$': 'jQuery',
        },
    },
});
  1. I am removing "/public/hot" when deploying.

Help me fix this issue.

0 likes
2 replies
shariff's avatar

Did you run npm run build command before deploying? If not just run the command npm run build and upload public/build folder to server.

navneet's avatar

@shariff Yes, I am running npm run build while deploying. I have also tried to build it locally and upload the public/build folder. Nothing seems to be working. I get the same error.

Please or to participate in this conversation.