Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Pixelairport's avatar

Vite problem: net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH

Hi,

I think I already read all blog posts about this and still dont understand, how I could make it work, so my last try is the forum. I setup laravel with vite and try to upgrade to vite 3, but I got all the time the error "ERR_SSL_VERSION_OR_CIPHER_MISMATCH". The page is loading with url starter.test (with valid trusted certificate) but the scripts were loaded from https://192.168.56.56:5173/@vite/client net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH. My vite config looks like that:

``php import { defineConfig, loadEnv } from 'vite'; import laravel from 'laravel-vite-plugin';

export default defineConfig( ({ command, mode }) =>{ const env = loadEnv(mode, process.cwd(), '');

return {
    plugins: [
        laravel({
            input: [
                'resources/scss/app.scss',
                'resources/themes/'+env.APP_THEME+'/scss/'+env.APP_THEME+'.scss',
                'resources/js/app.js',
                'resources/themes/'+env.APP_THEME+'/js/'+env.APP_THEME+'.js',
            ],
            refresh: true,
        }),
    ],
    server: {
        host: '192.168.56.56',
        watch: {
            usePolling: true,
        },
        hmr: {
            host: '192.168.56.56'
        }
    }
}

}); ``

Does someone has an idea what I can do? Since i switched from webpack to vite, i had a lot of problems to understand what to do.

0 likes
6 replies
Sinnbeck's avatar

It's very much dependent on how you run laravel. So valet? Docker?

Pixelairport's avatar

@LoverToHelp no does not work. I think i will check if it works with sail and then maybe switch from homestead to sail.

Pixelairport's avatar

Im still trying to do it with homestead. What I found out is, that everything works if i stop npm run dev. Then everything is loaded. It seems the ports make a problem. The scripts are loaded from https://starter.test:3000/resources/scss/app.scss when "npm run dev" is running. If not the scripts are loaded from build directory what works. In my homestead.yaml I set this:

ports:
     - send: 3000
       to: 3000
Pixelairport's avatar
Pixelairport
OP
Best Answer
Level 12

Ok. I switched back to webpack (mix) and everything works now. Maybe i will use vite in future, but now i have to go on with my project.

Please or to participate in this conversation.