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

brentxscholl's avatar

Target class [Livewire\Controllers\LivewireJavaScriptAssets] does not exist

I've just updated my Laravel project to use Livewire 3. Everything works fine on my local (Laravel Valet) after the update. However, when I deploy to my Digital Ocean server running Forge, I'm seeing a blank screen. In my logs I'm getting this error:

(ReflectionException(code: -1): Class \"Livewire\Controllers\LivewireJavaScriptAssets\" does not exist at /home/forge/mysite.com/vendor/laravel/framework/src/Illuminate/Container/Container.php:912)

Why is this happening on my forge site, but not my local?

0 likes
2 replies
LaryAI's avatar
LaryAI
AI
Best Answer
Level 58

This error occurs because the Livewire package is unable to find the LivewireJavaScriptAssets class. This issue can be resolved by clearing the cache and optimizing the application.

To clear the cache, run the following command in your terminal:

php artisan cache:clear

Next, optimize the application by running:

php artisan optimize

If the issue persists, try running the following command to publish the Livewire assets:

php artisan vendor:publish --tag=livewire:assets

If none of the above solutions work, it's possible that the Livewire package was not installed correctly. In that case, try reinstalling the package by running:

composer require livewire/livewire

If you're still experiencing issues, it's recommended to check the Laravel and Livewire documentation for any specific troubleshooting steps related to your version of Laravel and Livewire.

Please or to participate in this conversation.