0

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
\
> ibm_db@0.0.8 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! ibm_db@0.0.8 install: `node installer/driverInstall.js`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the ibm_db@0.0.8 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.

joy
  • 3,669
  • 7
  • 38
  • 73

1 Answers1

0

ibm_db@0.0.8 node_modules/ibm_db ├── bindings@1.0.0 ├── fstream@1.0.4 (inherits@2.0.1, graceful-fs@3.0.6, mkdirp@0.5.0, rimraf@2.3.2) ├── tar.gz@0.1.1 (commander@1.1.1, tar@0.1.20, fstream@0.1.31) └── unzip@0.1.11 (setimmediate@1.0.2, readable-stream@1.0.33, match-stream@0.0.2, pullstream@0.4.1, binary@0.3.0, fstream@0.1.31)

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

  • I am also using 64bit. Happy to know that it's working for you. Did you install anything else? – joy Apr 14 '15 at 00:56
  • Can you please share your package.json for my reference? May be there is some dependencies on other module. – joy Apr 14 '15 at 00:57
  • It worked :-) Problem was due to office proxy. Though i skipped it by modifying .npmrc however still it was blocking the intermediate ibm URL. I switched to public network then it worked :-) Thanks for your post. It helped me to rethink. – joy Apr 14 '15 at 01:00
  • There seams to be a similar issue now on Mac OS X Yosemite 10.10.3. The ibm_db module fails to install with: /Users/peterpoliwoda/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ In file included from ../src/odbc.cpp:26: ../src/odbc_connection.h:67:48: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? static Handle CreateStatement(const Arguments& args); ^~~~~~~~~ v8::internal::Arguments – Peter Poliwoda May 06 '15 at 22:03
  • Ibm_db does not support 0.12.x yet. If you look into their package.json -- engine wanted: "node": "<0.12.0". – mouse smart Jun 15 '15 at 03:19
  • I heard that they are working on it soon. see this [link](https://github.com/ibmdb/node-ibm_db/issues/28) https://github.com/ibmdb/node-ibm_db/issues/28 – hohoho Jun 15 '15 at 03:21