Using Laravel Echo (Pusher) On Laravel Vapor

I had some difficulties finding out why my events are not "triggered" in the frontend (Laravel Echo + Pusher) with my application being deployed through Laravel Vapor, even though it was working out perfectly locally.

Pushers debug console was actually showing that the events are actually being dispatched to Pusher by the Laravel application.

Since I pretty much wasted around half a day finding out what was wrong (by luck, I saw my message showing up in real-time in my local environment instead of staging after posting something on staging), I though I'll spend another 10 minutes writing a post here so some people (hopefully) don't need to waste as much time.



I've spent hours trying to figure out the same issue and was about to lose it.

I just found this post decribing an npm package that helps with this.


NPM package