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

dev.khosromanesh's avatar

Echo is not defined

include this to blade template @vite(['resources/sass/app.scss', 'resources/js/app.js']) run

npm install --save-dev laravel-echo pusher-js
composer require pusher/pusher-php-server

uncomment echo from bootstrap.js

and still error exist Echo is not defiend what should i do ?

0 likes
5 replies
tykus's avatar

You also uncommented the line?

import Echo from 'laravel-echo';
dev.khosromanesh's avatar

@tykus in my case there's not such thing in blade file

<script src="{{ asset('js/app.js') }}" defer></script>

it may related to this ?

Please or to participate in this conversation.