npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

idb-connector - dbconn is not a constructor

i try to get the sample from the idb-connector site to run.
the idb-connector is installed.
if copy the sample in a test.js and store it in the ifs.
then i call “qp2term” and navigate to the ifs-folder where the js-file ist stored.
i install idb-connector with “npm i idb-connector” and run the file.
const {dbconn, dbstmt} = require('idb-connector');
const connection = new dbconn();
the scripts fails with the the error : TypeError: dbconn is not a constructor
node - v6.14.4
npm - 3.10.10
ibm os 7.2

(Moved to #community:javascript. As this is an npm focused forum, you may get better answers by asking somewhere focused on idb-connector.)

I did find a report of same issue, but the reporter did not solve it on their original system:


i installed node 10 via yum and now the error is gone !