Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ws@2.3.1 is last supported version for Node.js v5.x.x #1286

Closed
Ralle opened this issue Jan 22, 2018 · 3 comments
Closed

ws@2.3.1 is last supported version for Node.js v5.x.x #1286

Ralle opened this issue Jan 22, 2018 · 3 comments

Comments

@Ralle
Copy link

Ralle commented Jan 22, 2018

Description

Been using ws for all projects requiring WebSocket support. It is hands down the only thing worth anybody's time. Good job.
I work on a project where I am forced to use Node.js version 5.12.0 because that is the latest version still supported on Windows Vista and Windows Server 2008 R1. Because of this I am forced to use ws@2.3.1 as version 3.0.0 drops support for my version of Node.js (the breaking changes chapter didn't mention any of this though).

Reproducible in:

version: ws@3.0.0 and forward
Node.js version(s): 5.12.0
OS version(s): All

Steps to reproduce:

Run ws on Node.js version 5.12.0. You can download it right here https://nodejs.org/dist/v5.12.0/ .

Expected result:

I expected that it worked.

Actual result:

TypeError: Cannot read property 'connection' of undefined
    at new Connection (eval at <anonymous> (D:\MDCMaxWeb\build\dev\server\main.js:251:1), <anonymous>:76:29)
    at WebSocketServer.handleConnection (eval at <anonymous> (D:\MDCMaxWeb\build\dev\server\main.js:251:1), <anonymous>:609:21)
    at WebSocketServer.eval (eval at <anonymous> (D:\MDCMaxWeb\build\dev\server\main.js:251:1), <anonymous>:584:18)
    at emitTwo (events.js:100:13)
    at WebSocketServer.emit (events.js:185:7)
    at D:\MDCMaxWeb\build\dev\node_modules\ws\lib\WebSocketServer.js:88:16
    at WebSocketServer.completeUpgrade (D:\MDCMaxWeb\build\dev\node_modules\ws\lib\WebSocketServer.js:270:5)
    at WebSocketServer.handleUpgrade (D:\MDCMaxWeb\build\dev\node_modules\ws\lib\WebSocketServer.js:197:10)
    at Server.<anonymous> (D:\MDCMaxWeb\build\dev\node_modules\ws\lib\WebSocketServer.js:87:14)
    at emitThree (events.js:110:13)

Attachments:

@lpinca
Copy link
Member

lpinca commented Jan 22, 2018

ws still supports Node.js 4 so version 5.12.0 should work. You are probably affected by this breaking change #1099 but it's easy to fix. See the comments there.

@lpinca
Copy link
Member

lpinca commented Jan 23, 2018

I'm closing this as the above link should provide enough info on how to upgrade.

@lpinca lpinca closed this as completed Jan 23, 2018
@Ralle
Copy link
Author

Ralle commented Jan 23, 2018

I had another look at my source code, and indeed, you are right. Sorry for creating this ticket.

Yay, now running ws@4.0.0, awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants