Skip to content

Travis run failing on node 0.10/0.12 due to unpinnned socket.io-client #1167

@edmorley

Description

@edmorley

The Travis run is failing on node 0.10/0.12 with:

/home/travis/build/nodejitsu/node-http-proxy/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/index.js:9
const WebSocket = require('./lib/WebSocket');
^^^^^
...
  1) lib/http-proxy.js #createProxyServer using the ws-incoming passes should proxy a socket.io stream:
     SyntaxError: Use of const in strict mode.
      at Server.init (node_modules/socket.io/node_modules/engine.io/lib/server.js:119:16)
      at new Server (node_modules/socket.io/node_modules/engine.io/lib/server.js:65:8)
      at Function.attach (node_modules/socket.io/node_modules/engine.io/lib/engine.io.js:123:16)
      at node_modules/socket.io/lib/index.js:258:23
      at Encoder.encode (node_modules/socket.io/node_modules/socket.io-parser/index.js:138:5)
      at Server.listen.Server.attach (node_modules/socket.io/lib/index.js:251:16)
      at new Server (node_modules/socket.io/lib/index.js:57:17)
      at Function.Server (node_modules/socket.io/lib/index.js:43:41)
      at Context.<anonymous> (test/lib-http-proxy-test.js:432:20)

(for example https://travis-ci.org/nodejitsu/node-http-proxy/jobs/230765815)

The package ws has dropped support for these versions of node:
websockets/ws#1077

Options are to:

  • Drop support for those versions of node from node-http-proxy too (they are EOL after all)
  • Pin to ws version 1.x. However engine.io-client 3.x explicitly requires ws 2.x, so we'd need to pin to engine.io-client 2.x (the latest of which is 2.2.1), which would mean falling back from socket.io-client 2.x to 1.7.4.

Note at the moment that node-http-proxy doesn't pin socket.io-client or many other devDependencies at all:

  "devDependencies": {
    "async": "*",
    "blanket": "*",
    "coveralls": "*",
    "dox": "*",
    "expect.js": "*",
    "mocha": "*",
    "mocha-lcov-reporter": "*",
    "semver": "^5.0.3",
    "socket.io": "*",
    "socket.io-client": "*",
    "sse": "0.0.6",
    "ws": "^0.8.0"
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions