Error when installing on docker node-red-contrib-db2 and node-red-contrib-db2-fixed


When I am trying to install on my docker image of node-RED node-red-contrib-db2 or node-red-contrib-db2-fixed I was initially having an error around " ReferenceError: primordials is not defined". I was able to resolve that by following the suggestions here to change the package.json file (instructions under using npm around overrides & preinstall scripts). After that, when I try the install I get the following error:

~ $ npm install node-red-contrib-db2
npm WARN deprecated tar.gz@0.1.1: ⚠️  WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead:
npm WARN deprecated tar@0.1.20: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm ERR! code 1
npm ERR! path /usr/src/node-red/node_modules/ibm_db
npm ERR! command failed
npm ERR! command sh -c node installer/driverInstall.js
npm ERR! Downloading DB2 ODBC CLI Driver from
npm ERR! (node:3177) Warning: Accessing non-existent property 'Reader' of module exports inside circular dependency
npm ERR! (Use `node --trace-warnings ...` to show where the warning was created)
npm ERR! (node:3177) Warning: Accessing non-existent property 'Reader' of module exports inside circular dependency
npm ERR! node:events:505
npm ERR!       throw er; // Unhandled 'error' event
npm ERR!       ^
npm ERR! 
npm ERR! Error: connect ECONNREFUSED
npm ERR!     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
npm ERR! Emitted 'error' event on ClientRequest instance at:
npm ERR!     at Socket.socketErrorListener (node:_http_client:454:9)
npm ERR!     at Socket.emit (node:events:527:28)
npm ERR!     at emitErrorNT (node:internal/streams/destroy:157:8)
npm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
npm ERR!   errno: -111,
npm ERR!   code: 'ECONNREFUSED',
npm ERR!   syscall: 'connect',
npm ERR!   address: '',
npm ERR!   port: 80
npm ERR! }

npm ERR! A complete log of this run can be found in:
npm ERR!     /data/.npm/_logs/2023-04-28T09_24_30_739Z-debug-0.log

Any ideas? I tried to ping the IP from docker terminal and seems to be OK but if I try to go to the webpage mentioned in the errors from my local computer it doesn't seem to work so I wonder if something is off that is not allowing to download the .tar.gz

Welcome to the forums @pferreira

I'll be honest with you, both the packages you have tried have not been updated in 5 years.
and you're having to resort to fixing them yourself.

One of the nodes have a PR, to update the driver version, dated 2019, and one with an unanswered issue back in 2018

Clearly it would seem these nodes do not see any maintenance, and are likely using URIs that have since been updated. :man_shrugging:

I know nothing about db2 (and 5 years may not be anything with db2 developments), so my advice may be invalid, but I would try different nodes, that have been updated more recently.

Library - Node-RED (

Thanks @marcus-j-davies. Unfortunately, I do not see any other package related with DB2 integration which is what I'm trying to achieve.

Are there any further ideas from the community here?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.