deno icon indicating copy to clipboard operation
deno copied to clipboard

Compatibility node-firebird

Open paulhendrix opened this issue 1 year ago • 1 comments

Version: Deno 1.38.3

Package: npm: node-firebird

import * as fb from "npm:node-firebird";

let options = {};
options.host = "localhost";
options.port = 3050;
options.database = "test1";
options.user = "SYSDBA";
options.password = "masterkey";

fb.attach(options, function (err, db) {
  console.log("debug1");
});

callback is never called, under node.js works ok

paulhendrix avatar Dec 01 '23 11:12 paulhendrix

I managed to trace the internal error that occurs, and the cause is a missing function 'removeAllListeners'. Now, how can we fix it?

TypeError: cb.response.removeAllListeners is not a function at exports.Connection.Connection.attach (file:///test/firebird/problem_deno/node_modules/.deno/[email protected]/node_modules/node-firebird/lib/index.js:3687:21) at file:///test/firebird/problem_deno/node_modules/.deno/[email protected]/node_modules/node-firebird/lib/index.js:1757:25 at cb (file:///test/firebird/problem_deno/node_modules/.deno/[email protected]/node_modules/node-firebird/lib/index.js:3615:13) at doCallback (file:///test/firebird/problem_deno/node_modules/.deno/[email protected]/node_modules/node-firebird/lib/index.js:1368:5) at file:///test/firebird/problem_deno/node_modules/.deno/[email protected]/node_modules/node-firebird/lib/index.js:3140:21 at decodeResponse (file:///test/firebird/problem_deno/node_modules/.deno/[email protected]/node_modules/node-firebird/lib/index.js:3419:24) at Socket. (file:///test/firebird/problem_deno/node_modules/.deno/[email protected]/node_modules/node-firebird/lib/index.js:3115:13) at Socket.emit (ext:deno_node/_stream.mjs:1851:9) at addChunk (ext:deno_node/_stream.mjs:2873:16) at readableAddChunk (ext:deno_node/_stream.mjs:2852:13) {stack: 'TypeError: cb.response.removeAllListeners is …eAddChunk (ext:deno_node/_stream.mjs:2852:13)', message: 'cb.response.removeAllListeners is not a function', __callSiteEvals: Array(10)}

paulhendrix avatar Apr 27 '24 12:04 paulhendrix

@paulhendrix thanks for opening the issue and sorry for a slow response. Do you still experience this problem using Deno v1.44.x?

bartlomieju avatar Jul 01 '24 22:07 bartlomieju

Closing this for now, due to lack of response. Please reopen if the problem perists.

bartlomieju avatar Jul 18 '24 13:07 bartlomieju

the attachment works but if i start db.query nothing happens. No error message, no result. deno 1.45.3 (release, x86_64-apple-darwin)

awunnenb avatar Jul 23 '24 20:07 awunnenb