It doesn't look like it can't find the javascript, you're getting an internal server error.
Must be something else.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Anyone using Livewire?
The head of my app.blade.php ends like this:
@livewireAssets
</head>
To load Livewire, but when I load my component view, I see the following error in the Google Chrome console:
http://newapp.test/livewire/livewire.js?id=baf105a7de86deff8ac1 Status: 500
Am I calling Livewire the wrong way. Looks like it can’t find livewire.js. My app is in the root directory, as is standard in a Laravel installation. I did not install Laravel in a subdirectory.
It doesn't look like it can't find the javascript, you're getting an internal server error.
Must be something else.
The specific error says:
Failed to load resource: the server responded with a status of 500 (Internal Server Error), and references the livewire.js file.
This 500 error often happens when a file isn't found in the expected path. I'm following the basic documentation of Livewire.
@wallyj I just did a fresh install of LiveWire, and it seems like everything is here.
Try: composer dump-autoload ?
Tried it. Still get:
net::ERR_ABORTED 500 (Internal Server Error) on the same URL for Livewire.js
@wallyj you can try removing livewire from the composer.json then run composer install.. and require it again.
Side note, why is it looking for the livewire.js in this directory: http://newapp.test/livewire/??
There is no "livewire" directory in the public directory.
@wallyj it is not in the public directory, but the route is being registered within the LivewireServiceProvider:
RouteFacade::get('/livewire/livewire.js', [LivewireJavaScriptAssets::class, 'unminified']);
is what makes it available. But for you it seems like the is not being registered. So you could try reinstalling or register the service provider within your config/app.php in the `providers array.
I guess you are running Laravel > 6.0 so this should be auto discovered already.
Removed livewire from composer.json. Ran composer update (tried install but it told me to run update to make sure composer.lock was current) Composer removed Livewire Ran composer require livewire/livewire It installed (from cache) Ran my app Same error.
@wallyj as I said, try to manually register the Service provider:
Add this in your config/app.php in the providers array:
\Livewire\LivewireServiceProvider::class,
And run composer dump-autoload.
Ok. Added the line to config/app.php. Ran composer dump-autoload.
Restarted the server for good measure.
Same error.
@wallyj okay, I give up :) does this happens on a freshly installed project. Or have you been running it for a while now? Tried different browser in case you have a plugin that blocks the request?
Can you see in your vendor/ directory that you have livewire sub directory?
This is really weird.
Yes. Very weird.
I tried it in Microsoft Edge (which I never use) and I received a similar error:
HTTP500: SERVER ERROR - The server encountered an unexpected condition that prevented it from fulfilling the request. GET - http://reassist.test/livewire/livewire.js?id=18f463023ea07950cbf6
Trying now on a new app.
I am running my apps on Laragon, running on a USB drive. That makes everything slow, but shouldn't affect whether Livewire installs and runs properly, right?
@wallyj cannot say for sure. Never tried running it like that :)
Interesting. It loaded just fine on a fresh, clean project. I only required Livewire, then added the
@livewireAssets
in the head of the welcome.blade.php view.
No error. Checked the Sources tab in Developer Tools of Chrome and it shows that livewire.js loaded just fine.
Not sure what is blocking it, but it shows that the USB setup is not the issue.
@wallyj do you have any other scripts in the other project?
Do you use the defer attribute on some of them. Had a similar issue recently where some of the attributes didn't worked for a guy using Livewire, but he didn't mentioned about getting 500 error.
You can check that. Talking about this:
<script src="{{ asset('js/app.js') }}" defer></script>
and after removing defer everything worked. Which sounds unrelated this time. But I don't know what else might be blocking the script from loading. Make sure that there are no other conflicts. You can comment out some scripts and try it that way. Hope you get it working :)
No use of "defer".
Interestingly, I still have the standard welcome.blade.php in my app that contains the error, so I added the
@livewireAssets
to that file to skip the app.blade.php setup to see if that was a factor. I still get the same error.
I think I'm going to clear the Composer cache and reinstall the Livewire package like I did before, but this time skipping the cache and going straight to the repository. I honestly don't think that will work but I'm gonna try. :)
Are you checking the Laravel Log file ?
local.ERROR: Non-static method Livewire\LivewireJavaScriptAssets::unminified() should not be called statically {"exception":"[object] (ErrorException(code: 0): Non-static method Livewire\LivewireJavaScriptAssets::unminified() should not be called statically at I:\laragon\www\REAssist\vendor\laravel\framework\src\Illuminate\Routing\Route.php:197) [stacktrace]
You have no error on pages without Livewire assets?
If you try to access the asset directly (in your browser address bar) do you get the same error
(copy the url from view source in your Livewire enabled page)
When I type the link in directly I receive this message:
ErrorException (E_DEPRECATED)
Non-static method Livewire\LivewireJavaScriptAssets::unminified() should not be called statically
If I do not include
@livewireAssets
in the head tag, my page has no errors. I have uninstalled and reinstalled Livewire twice on my project.
Not sure what to do now. I agree with @nakov , this is weird. Might be a bug or conflict, but unsure what the next troubleshooting step is.
@wallyj make sure you use the same version in your old project, as with the new one that you created and it worked. Compare the Laravel version, PHP version and the LiveWire version. That's all I can think of.
Ok. I am just now realizing that this project sat around untouched, before adding Livewire, MUCH longer than I thought. The Laravel version on this app is 5.6.16.
I will upgrade to the latest version and then check Livewire again.
Would it be easier to just do a fresh install and then try to move my controllers, models, and views over and then make config changes as necessary? Or can I just make the Laravel framework change in my composer.json file and let Laravel take care of the rest?
If upgrading you will need to check the upgrade instructions to make sure you follow all steps incase any of them impact your project
Right. But if I go step by step then I will upgrade 3 times.
But I'm going to go that route and check the upgrade docs as I go. I think upgrading Laravel will fix the Livewire issue.
Hi!, I'm having a similar kind of problem. In the page's source the livewire.js link is
http://localhost/livewire/livewire.js?id=470956373e3454996f6b
but when I try it in the browser throws a 404 error
The real path for the livewire.js is
http://localhost/mynewproject/b_end/vendor/livewire/livewire/dist/livewire.js
I modified the 'asset_url' => null, on config/livewire.php file by 'asset_url' => '/vendor', and it add this fine to the start of the path, but still need the /livewire/dist/ sub-path that I don't know how to add.
Sorry for mistakes or silly acts but I'm absolutely newbie on Laravel and more on Livewire (starting today with it lol).
Please, any advice over here?
NOTE: This is a completely fresh Laravel - Livewire install and I'm using the Laravel's welcome page to test the Livewire's counter example
There is a route added that serves the js file so you don't need to get it from the vendor folder.
check your app_url is valid
If you want to follow this up properly, start a new discussion
Thank you. I'll do if it doesn't work following your advice.
possible Incorrect .htaccess file
work code: 'asset_url' => "/public" in config/livewire.php config file
Please or to participate in this conversation.