#vitejs firefox can't create connection

11 messages · Page 1 of 1 (latest)

knotty sonnet
#

I have this weird error lately:

Firefox can’t establish a connection to the server at wss://127.0.0.1:5173/. client.ts:78:17
[vite] failed to connect to websocket.
your current setup:
  (browser) 127.0.0.1:5173/ <--[HTTP]--> 127.0.0.1:5173/ (server)
  (browser) 127.0.0.1:5173/ <--[WebSocket (failing)]--> 127.0.0.1:5173/ (server)
Check out your Vite / network configuration and https://vitejs.dev/config/server-options.html#server-hmr . client.ts:48:16

I have tried some things with my vite config:

import laravel from 'laravel-vite-plugin';

const host = 'nik.test'
export default defineConfig({
    plugins: [
        laravel({
            host,
            hmr: false,
            input: ['resources/css/app.css', 'resources/js/app.js'],
            refresh: true,
        }),
    ],
});

But it doesn't work. Any suggestions?

elder mulch
#

I dont think you need the host or hmr when working locally

knotty sonnet
#

I am using valet

#

Orriginaly I had this:

export default defineConfig({
    plugins: [
        laravel({
            input: ['resources/css/app.css', 'resources/js/app.js'],
            refresh: true,
        }),
    ],
});
elder mulch
#

Yesterday, the Laravel team launched the official vite-plugin. From now on, Vite will be the standard build tool for Laravel. The main benefits are vastly improved build times and a more straightforward API. Want to know more about it? Head over to the official docs. There's also a migration guide to go from Mix to Vite.
When I followed that gui...

#

i dont use valet, I'm still using vagrant and homestead

knotty sonnet
#

Yes it does show something.

knotty sonnet
#

THe weird thing is that this happened since I installed tailwind/typography