Skip to content

Socket creation error on Node version 7.7.2 #532

@yasen-atanasov

Description

@yasen-atanasov

Hi,

Upgrading to node v.7.7.2 on Windows results in this error when trying to use Tedious:

events.js:307
    throw new TypeError('"listener" argument must be a function');
    ^

TypeError: "listener" argument must be a function
    at Socket.once (events.js:307:11)
    at Socket.connect (net.js:943:10)
    at Connection.connectOnPort (c:\wrk\xogito\ussquash\usq_api\node_modules\tedious\lib\connection.js:429:19)
    at Connection.connect (c:\wrk\xogito\ussquash\usq_api\node_modules\tedious\lib\connection.js:402:21)
    at Connection.initialiseConnection (c:\wrk\xogito\ussquash\usq_api\node_modules\tedious\lib\connection.js:77:12)
    at Connection.enter (c:\wrk\xogito\ussquash\usq_api\node_modules\tedious\lib\connection.js:975:19)
    at Connection.transitionTo (c:\wrk\xogito\ussquash\usq_api\node_modules\tedious\lib\connection.js:508:33)
    at new Connection (c:\wrk\xogito\ussquash\usq_api\node_modules\tedious\lib\connection.js:66:10)

Going to row 429 in tedious/lib/connection.js and adding an empty function as a second parameter to the socket.connect call resolves the issue. I'm not sure whether this is a nodejs or tedious problem.

For the time being I've downgraded node to 7.7.1

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