You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Node 7.7.2 TypeError: "listener" argument must be a function #425
'use strict';letconfig={user: sql_user,password: sql_psw,server: sql_server,database: sql_database}letsql=require('mssql');letquery='select * from t1';letconnection=newsql.Connection(config)connection.connect().then((conn)=>{returnnewsql.Request(conn).query(query).then(function(data){// ...})}).catch((err)=>{console.log(err);});
Node 7.7.1 work fine. Node 7.7.2 throw error:
TypeError: "listener" argument must be a function
at Socket.once (events.js:307:11)
at Socket.connect (net.js:943:10)
at Connection.connectOnPort (\node_modules\tedious\lib\connection.js:429:19)
at \node_modules\tedious\lib\connection.js:411:27
at Socket.onMessage (\node_modules\tedious\lib\instance-lookup.js:28:14)
at emitTwo (events.js:106:13)
at Socket.emit (events.js:194:7)
at UDP.onMessage [as onmessage] (dgram.js:546:8)
Activity
patriksimek commentedon Mar 9, 2017
Thanks, this originates in Tedious, but I don't understand what's wrong atm. I will investigate the issue.
vhain commentedon Mar 9, 2017
It can be bug of Node 7.7.2. If yes, it should be solved by nodejs/node#11762
patriksimek commentedon Mar 11, 2017
Discussed directly in tedious here: tediousjs/tedious#532