npm install failing on mac osx yosemite
See original GitHub issuenpm install is failing as shown below
mpro:~ saboji$ npm install ibm_db
ibm_db@0.0.12 install /Users/saboji/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… Download and extraction of DB2 ODBC CLI Driver completed successfully … CXX(target) Release/obj.target/odbc_bindings/src/odbc.o
{ [Error: Command failed: /bin/sh -c node-gyp configure build --IBM_DB_HOME=$IBM_DB_HOME --IBM_DB_HOME_WIN=%IBM_DB_HOME% --IS_DOWNLOADED=true
In file included from …/src/odbc.cpp:25:
…/src/odbc.h:76:85: error: unknown type name ‘NanCallback’
static Handle<Value> CallbackSQLError(SQLSMALLINT handleType, SQLHANDLE handle, NanCallback* cb);
^
…/src/odbc.h:77:101: error: unknown type name ‘NanCallback’
static Handle<Value> CallbackSQLError (SQLSMALLINT handleType, SQLHANDLE handle, char* message, NanCallback* cb);
^
…/src/odbc.h:112:3: error: unknown type name ‘NanCallback’
NanCallback* cb;
^
In file included from …/src/odbc.cpp:26:
…/src/odbc_connection.h:95:7: error: unknown type name ‘NanCallback’
NanCallback* callback;
^
…/src/odbc_connection.h:113:3: error: unknown type name ‘NanCallback’
NanCallback* cb;
^
…/src/odbc_connection.h:120:3: error: unknown type name ‘NanCallback’
NanCallback* cb;
^
…/src/odbc_connection.h:143:3: error: unknown type name ‘NanCallback’
NanCallback* cb;
^
…/src/odbc_connection.h:151:3: error: unknown type name ‘NanCallback’
NanCallback* cb;
^
In file included from …/src/odbc.cpp:27:
…/src/odbc_result.h:66:7: error: unknown type name ‘NanCallback’
NanCallback* cb;
^
In file included from …/src/odbc.cpp:28:
…/src/odbc_statement.h:73:7: error: unknown type name ‘NanCallback’
NanCallback* callback;
^
…/src/odbc_statement.h:95:3: error: unknown type name ‘NanCallback’
NanCallback* cb;
^
…/src/odbc_statement.h:103:3: error: unknown type name ‘NanCallback’
NanCallback* cb;
^
…/src/odbc_statement.h:109:3: error: unknown type name ‘NanCallback’
NanCallback* cb;
^
…/src/odbc_statement.h:117:3: error: unknown type name ‘NanCallback’
NanCallback* cb;
^
…/src/odbc.cpp:48:3: error: use of undeclared identifier ‘NanScope’
NanScope();
^
…/src/odbc.cpp:50:50: error: use of undeclared identifier ‘NanNew’
Local<FunctionTemplate> constructor_template = NanNew<FunctionTemplate>(New);
^
…/src/odbc.cpp:50:57: error: ‘FunctionTemplate’ does not refer to a value
Local<FunctionTemplate> constructor_template = NanNew<FunctionTemplate>(New);
^
/Users/saboji/.node-gyp/0.12.7/deps/v8/include/v8.h:3452:17: note: declared here
class V8_EXPORT FunctionTemplate : public Template {
^
…/src/odbc.cpp:53:38: error: use of undeclared identifier ‘NanNew’
constructor_template->SetClassName(NanNew(“ODBC”));
^
…/src/odbc.cpp:66:29: error: use of undeclared identifier ‘NanNew’
constructor_template->Set(NanNew<String>(“SQL_CLOSE”), NanNew<Number>(SQL_CLOSE), constant_attributes);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/odbc_bindings/src/odbc.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 14.1.0
gyp ERR! command “node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “configure” “build” “–IBM_DB_HOME=/Users/saboji/node_modules/ibm_db/installer/clidriver” “–IBM_DB_HOME_WIN=%IBM_DB_HOME%” “–IS_DOWNLOADED=true”
gyp ERR! cwd /Users/saboji/node_modules/ibm_db
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
]
killed: false,
code: 1,
signal: null,
cmd: ‘/bin/sh -c node-gyp configure build --IBM_DB_HOME=$IBM_DB_HOME --IBM_DB_HOME_WIN=%IBM_DB_HOME% --IS_DOWNLOADED=true’ }
npm ERR! Darwin 14.1.0
npm ERR! argv “node” “/usr/local/bin/npm” “install” “ibm_db”
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! ibm_db@0.0.12 install: node installer/driverInstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ibm_db@0.0.12 install script ‘node installer/driverInstall.js’.
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! Please include the following file with any support request: npm ERR! /Users/saboji/npm-debug.log
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (5 by maintainers)
@chethankumar Since you are using node.js v4.2.1, you should use this command:
npm install git+https://git@github.com/ibmdb/node-ibm_db.git#v4_support
Above command is supported for Windows. On Windows ibm_db is not working with node.js v4.x yet.
Thanks.
ibm_db@0.0.19 is supported for node.js v 0.10.x, 0.12.x and 4.x. Thanks.