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

chm_matt's avatar

Detected multiple instances of Livewire running - Livewire 3

In the console I'm getting the following errors:

VM11743 livewire.js:7789 Detected multiple instances of Livewire running
(anonymous) @ VM11743 livewire.js:7789
(anonymous) @ VM11743 livewire.js:7799
VM11743 livewire.js:7791 Detected multiple instances of Alpine running
(anonymous) @ VM11743 livewire.js:7791
(anonymous) @ VM11743 livewire.js:7799
livewire.js?id=5d3e67e0:7789 Detected multiple instances of Livewire running
(anonymous) @ livewire.js?id=5d3e67e0:7789
(anonymous) @ livewire.js?id=5d3e67e0:7799
livewire.js?id=5d3e67e0:7791 Detected multiple instances of Alpine running

And I can't for the life of me work out what is causing them to show. I definitely haven't got Livewire scripts being added manually anywhere - I'm leaving it all up to Livewire to inject them in line with the docs. I'm just going round in circles trying to find the solution. Does anyone have any suggestions on where to look?

0 likes
11 replies
chm_matt's avatar

If anyone has the same issue, I switched to manually including the frontend assets and it is working fine.

1 like
ZermattChris's avatar

@chm_matt Any chance you could spell out exactly what you did, for us noobs who've just been slapped in the face with the same/similar issue? (I've been going in circles for hours and not getting anywhere with the various comments found on the Intertubes...).

Fingers crossed :-)

chm_matt's avatar

@ZermattChris, in config/livewire.php set inject_assets' => false, then in your layout blade files put @livewireStyles just above the </head> tag and @livewireScripts just above the </body> tag.

I'd recommend checking what @pauladams mentioned. The blade templates that shipped with Laravel Breeze when I created the project included <x-app-layout> tags which may have been the problem. The changes I made fixed the issue so I didn't look further, but it would be nice to have the problem fixed and the assets injected automatically.

2 likes
PaulAdams's avatar

Check you have not wrapped your blade files in layout tags. Livewire includes the layout automatically so you could end up with Livewire and Alpine being loaded twice.

2 likes
chm_matt's avatar

Thanks @pauladams , I had started to come to that conclusion myself after some further testing.

Paul_Dev's avatar

J'ai le même problème, j'ai fait tout ce que vous avez dit mais le problème persiste toujours

warpig's avatar

here's what i have on mine:

app.js

import './bootstrap';
import { Livewire, Alpine } from '../../vendor/livewire/livewire/dist/livewire.esm';
import persist from '@alpinejs/persist';

// window.Alpine = Alpine;
Alpine.plugin(persist)
// Alpine.start();
// Livewire.start()

app.blade.php

        @livewireStyles
        @vite(['resources/css/app.css', 'resources/js/app.js'])
    </head>

            @livewireScripts
        </div>
    </body>
</html>

'inject_assets' is set to false on "config/livewire.php", and these are the errors im seeing:

Detected multiple instances of Livewire running livewire.esm.js:10640:55
Detected multiple instances of Alpine running
Uncaught TypeError: can't redefine non-configurable property "$persist"

The component is wrapped inside a layout tag on this location resources/views/admin/tags/index.blade.php like this:

<x-app-layout>
					....
<livewire:create-tags />
</x-app-layout>

not sure i follow what @pauladams was saying, should i instead create a full page component?

Please or to participate in this conversation.