laravel / pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.
https://pulse.laravel.com
MIT License
1.43k stars 164 forks source link

Class "Asset" not found #195

Closed dragonfire1119 closed 9 months ago

dragonfire1119 commented 9 months ago

Pulse Version

v1.0.0-beta5

Laravel Version

10.35.0

PHP Version

8.1.24

Livewire Version

3.0.2

Database Driver & Version

No response

Description

Servers Card

When I have the servers card, it gives me:

Class "Asset" not found

The issue seems to be with:

@js

If I remove all or @js, it will render.

vendor/laravel/pulse/resources/views/livewire/servers.blade.php:70

https://github.com/laravel/pulse/blob/9c65d50d22529b6034b520257d105ee9b279ca3d/resources/views/livewire/servers.blade.php#L70

Queues Card

This happens on the queues card too:

syntax error, unexpected identifier "queued", expecting ")"

If I remove all @js calls, it renders.

vendor/laravel/pulse/resources/views/livewire/queues.blade.php:81

https://github.com/laravel/pulse/blob/9c65d50d22529b6034b520257d105ee9b279ca3d/resources/views/livewire/queues.blade.php#L76

Steps To Reproduce

I just go to the Pulse dashboard, and it pops up an error. When using servers or queue cards.

Solution

Changed:

@js(<code>)

to:

{{ <code> }}
ahinkle commented 9 months ago

Can you create a replicable repository or unit test of this problem? We need more details.

jbrooksuk commented 9 months ago

Please provide us with the exact version of Pulse you're running. v1.0.0-beta5 is currently the latest version, so please ensure you're installing that.

driesvints commented 9 months ago

Closing this issue because it's inactive, already solved, old or not relevant anymore. Feel to open up a new issue if you're still experiencing this.

jessarcher commented 9 months ago

I've made some changes to the charts in #206. Still using @js though so I don't know if it will help. I can't think of any reason why @js could cause that error and I haven't seen the error locally.

dragonfire1119 commented 9 months ago

@ahinkle I will delve deeper into this when my schedule allows.

@driesvints It is noteworthy that the closure of this matter took place with remarkable speed.

@jbrooksuk My current Laravel Pulse version is v1.0.0-beta5.

@jessarcher I appreciate your assistance. At the moment, I have simply copied your components and imported them as if they were custom components, with the @js replaced by {{ }}.

Is the @js syntax derived from Livewire? I've had difficulty finding documentation on the new site; it appears that only the previous Livewire site contains relevant information. I am unfamiliar with Livewire, which prompted my inquiry.