title: Uncaught ReferenceError: module is not defined at echo.js:768
body: <p>I'm making a simple chat application, I get this error while connecting to pusher, I'm using laravel 5.4</p>
  
  <p><a href="https://i.stack.imgur.com/Tbcsl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Tbcsl.png" alt="enter image description here"></a></p>
  
  <p>Every thing is working fine like pusher and database etc. Due to this error i did not get response</p>
  
  <p>Here is code </p>
  
  <pre><code>Echo.join('chatroom').
  .listen('MessagePosted', (e) =&gt; {
      console.log(e)
  });
  </code></pre>