From f314475c0e5226fa406879d7c634dac9df47406c Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:16:48 -0700 Subject: [PATCH] fix: correctly consume `ws` package --- packages/engine.io-client/lib/transports/websocket.node.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/engine.io-client/lib/transports/websocket.node.ts b/packages/engine.io-client/lib/transports/websocket.node.ts index 83777991c..c587cceb7 100644 --- a/packages/engine.io-client/lib/transports/websocket.node.ts +++ b/packages/engine.io-client/lib/transports/websocket.node.ts @@ -1,4 +1,4 @@ -import { WebSocket } from "ws"; +import * as ws from "ws"; import type { Packet, RawData } from "engine.io-parser"; import { BaseWS } from "./websocket.js"; @@ -27,7 +27,7 @@ export class WS extends BaseWS { opts.headers.cookie.push(`${name}=${cookie.value}`); } } - return new WebSocket(uri, protocols, opts); + return new ws.WebSocket(uri, protocols, opts); } doWrite(packet: Packet, data: RawData) {