Closed sergei1152 closed 7 years ago
It looks like this is an issue with the ws
module. Installing the bufferutil
and utf-8-validate
modules, as per reccomendation on their npm page breaks the module. The issue seems to be that the api that they use for the mocks doesnt match the api for the most updated versions of these modules. Weird because they list the most updated version of these in their package.json.
Performing an npm remove bufferutil
and npm remove utf-8-validate
after installation of socket.io seemed to have resolved the issue.
There is a PR for this in engine.io as it seems: https://github.com/socketio/engine.io/pull/487
Installing the versions ws@1.1.2 requires worked for me:
bufferutil@1.2.x
utf-8-validate@1.2.x
You can use bufferutil@<2
and utf-8-validate@<3
with ws@1
.
Removing them completely is something that also worked, though this should probably be documented in the README, as it was an annoying issue to resolve.
At least until ws is upgraded in engine.io
@sergei1152 is there anything else we can do here?
@darrachequesne we released ws@1.1.4
with support for all bufferutil
and utf-8-validate
versions.
@lpinca awesome, as usual. I guess we can close the issue then, thanks.
Note: for support questions, please use one of these channels: stackoverflow or slack
You want to:
Current behaviour
Steps to reproduce (if the current behaviour is a bug)
1) Start headless socket.io server with:
2) Attempt client side connection with socket.io-client@1.7.3
Note that I'm using webpack as my build system, and taking in socket.io-client through an import instead of it being served down in the
/socket.io
route like it usually should, though I doubt this should matter.The server runs fine if there are no incoming connections. As soon as a client tries to connect I get the issue seen below.
Expected behaviour
Not crash
Setup
Other information (e.g. stacktraces, related issues, suggestions how to fix)
Node version: 7.5.0