I'm getting the same error when using last version of socket.io-client on Node.js. If I use an older version like v2.3.0 I don't get any error.