title: Nestjs server does not serve socket.io client
body: <p>I have a split app using <code>nestjs</code> on the server and an <code>Angular</code> app as the client. Setting up websockets with socket.io seemed pretty easy using the <code>@nestjs/websockets</code> module and on the client I used <code>ngx-socket-io</code>. I used this <a href="https://github.com/joshuamorony/ionic-nestjs-websockets-live-chat" rel="nofollow noreferrer">repo</a> as basis. Now when I update the project's <code>@nestjs/websockets</code> dependency to the latest version I get </p>
  
  <ul>
  <li>CORS errors and</li>
  <li>an error that the client couldn't load the socket.io client js file
  <a href="https://i.stack.imgur.com/dHRGQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dHRGQ.png" alt="http://localhost:3000/socket.io/?EIO=3&amp;transport=polling&amp;t=Mg48H4P"></a></li>
  </ul>
  
  <p>I expected CORS problems and after the update, I could fix them by adding </p>
  
  <pre class="lang-js prettyprint-override"><code>  app.enableCors({
      origin: 'http://localhost:4200',
      credentials: true,
    });
  </code></pre>
  
  <p>to my <code>main.ts</code> file, but I don't know why the client file is not served. With the version of the repo (5.7.x) there are neither CORS errors nor problems with serving the file.</p>
  
  <p>I tried a couple of settings of <code>@WebSocketGateway()</code>, moving to a different port, setting <code>serveClient</code> (even though it should be <code>true</code> by default), but nothing seemed to work. Any advice?</p>
  
  <p>thanks</p>