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

Neeraj1005's avatar

The requested URL /vendor/livewire/livewire.js was not found on this server.

In my project I have laravel livewire I don't know why this error encounter..

in console it returns this error.

create:77 Uncaught ReferenceError: Livewire is not defined

can anyone tells me what I did wrong the problem

<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="dns-prefetch" href="https://fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet" type="text/css">


    @livewireStyles

</head>

<body>
    <main class="py-4">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-md-8">
                    <livewire:counter />
                </div>
            </div>
    </main>

    @livewireScripts
</body>

</html>

0 likes
2 replies
Neeraj1005's avatar
Neeraj1005
OP
Best Answer
Level 9

Now I have solved this issue by changing the asset_url in the livewire.config file

  • first run php artisan vendor:publish
  • then select livewire config file
  • After that open file and edit asset_url null to your filename
'asset_url'  => 'MY_PROJECT_NAME',

Please or to participate in this conversation.