npm install ibm_db2 is failing (need to use db2 database using nodejs)

1.9k Views Asked by At

In my project we have Db2 database which we need to connect using nodejs. I went through ibm_db2 blog however not able to install ibm_db2 module. Seems like I need to install IBM Data Server driver which seems not available on Mac (I am using Mac Yosemite for development). I am getting following error when i tried "npm install ibm_db2"

bash-3.2$ npm install ibm_db
\
> [email protected] install 

/user/test/jumpstart/node_modules/ibm_db

node installer/driverInstall.js

Downloading DB2 ODBC CLI Driver from http://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/macos64_odbc_cli.tar.gz...

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: getaddrinfo ENOTFOUND
    at errnoException (dns.js:37:11)
    at Object.onanswer [as oncomplete] (dns.js:124:16)

npm ERR! [email protected] install: `node installer/driverInstall.js`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the ibm_db package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node installer/driverInstall.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls ibm_db
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 14.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "ibm_db"
npm ERR! cwd /user/test/jumpstart
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

Even I tried to delete "node_modules" folder and tried again but faced same proble.

Please help.

1

There are 1 best solutions below

6
On BEST ANSWER

[email protected] node_modules/ibm_db ├── [email protected] ├── [email protected] ([email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected]) └── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

Have you tried recently? It is working fine for me on mac. You may want to submit issue report to ibm_db. My mac version is OS X yosemite 10.10.2

Are you using 64 bit node.j or 32 bit node.js? I am using 64 bit node.j