Most likely it is related to the hosting (or server) configuration. Some hosting (like Vercel) does not support sockets. https://vercel.com/guides/do-vercel-serverless-functions-support-websocket-connections