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

sampaioPT's avatar

After update laravel 9 to 10 version , the command npm run dev doesn't work and detect changes

Vite Plugin Version

4.3.9

Laravel Version

10.13.2

Node Version

20.2.0

NPM Version

9.7.1

Operating System

Windows (WSL)

OS Version

10

Web browser and version

Firefox 113.0.2

Running in Sail?

No

Description

Hi guys,

I started developing a project in laravel version 9 with vue. Then when Laravel released a new version (10) I updated my project to the new version. After that, when I do "npm run dev" the project doesn't load and it doesn't detect any changes in the vue files.

imagem

This is my vite.config.js file

import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
import * as path from 'path';

export default defineConfig({
    plugins: [
        laravel({
            input: [
                'resources/assets/js/app.js',
            ],
            refresh: true,
        }),
        vue({
            template: {
                transformAssetUrls: {
                    base: null,
                    includeAbsolute: false,
                },
            },
        }),
    ],
    css: {
        preprocessorOptions: {
            scss: {
                additionalData: `@import "./resources/assets/sass/_variables.scss";`
            }
        }
    },
    resolve: {
        alias: {
            vue: 'vue/dist/vue.esm-bundler.js',
            '~bootstrap': path.resolve(__dirname, 'node_modules/bootstrap'),
        },
    },
});

Can anyone help?

0 likes
2 replies
jlrdw's avatar

And you performed every step in the upgrade guide to manually upgrade laravel prior to upgrading the framework?

2 likes
sampaioPT's avatar

@dacfabre Thanks for your reply! yes. I performed every step. but the problem remains.

Edit:

Eureka!

    server: {
        host: '127.0.0.1',  // Add this to force IPv4 only
    },

This did the trick!

Please or to participate in this conversation.