node-ibm_db: Error in installing ibm_db
Hi, I am getting the below error in mac while doing “npm install ibm_db”. Absolutely no clue as I am a UI developer.
Nagas-MacBook-Pro:lib nagasrinivasa$ npm install ibm_db
ibm_db@2.4.0 install /usr/local/lib/node_modules/ibm_db node installer/driverInstall.js
Downloading DB2 ODBC CLI Driver from https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/macos64_odbc_cli.tar.gz…
100.00% | 20080158 bytes downloaded out of 20080158 bytes.
You are downloading a package which includes the Node.js module for IBM DB2/Informix. The module is licensed under the Apache License 2.0. The package also includes IBM ODBC and CLI Driver from IBM, which is automatically downloaded as the node module is installed on your system/device. The license agreement to the IBM ODBC and CLI Driver is available in undefined Check for additional dependencies, which may come with their own license agreement(s). Your use of the components of the package and dependencies constitutes your acceptance of their respective license agreements. If you do not accept the terms of any license agreement(s), then delete the relevant component(s) from your device.
Downloading and extraction of DB2 ODBC CLI Driver completed successfully …
CXX(target) Release/obj.target/odbc_bindings/src/odbc.o
{ Error: Command failed: node-gyp configure build --IS_DOWNLOADED=true --IBM_DB_HOME=“$IBM_DB_HOME” xcode-select: error: tool ‘xcodebuild’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance
xcode-select: error: tool ‘xcodebuild’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance
…/src/odbc.cpp:210:15: warning: ‘Call’ is deprecated [-Wdeprecated-declarations] data->cb->Call(1, info); ^ …/node_modules/nan/nan.h:1617:3: note: ‘Call’ has been explicitly marked deprecated here NAN_DEPRECATED inline v8::Localv8::Value ^ …/node_modules/nan/nan.h:98:40: note: expanded from macro ‘NAN_DEPRECATED’
define NAN_DEPRECATED attribute((deprecated))
^
…/src/odbc.cpp:217:80: error: no matching member function for call to ‘NewInstance’
Local<Object> js_result = Nan::New<Function>(ODBCConnection::constructor)->NewInstance(2, info);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/nagasrinivasa/.node-gyp/10.0.0/include/node/v8.h:3851:44: note: candidate function not viable: requires single argument ‘context’, but 2 arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^
/Users/nagasrinivasa/.node-gyp/10.0.0/include/node/v8.h:3848:44: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^
…/src/odbc.cpp:222:15: warning: ‘Call’ is deprecated [-Wdeprecated-declarations]
data->cb->Call(2, info);
^
…/node_modules/nan/nan.h:1617:3: note: ‘Call’ has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Localv8::Value
^
…/node_modules/nan/nan.h:98:40: note: expanded from macro ‘NAN_DEPRECATED’^
define NAN_DEPRECATED attribute((deprecated))
^
…/src/odbc.cpp:262:78: error: no matching member function for call to ‘NewInstance’
Local<Object> js_result = Nan::New<Function>(ODBCConnection::constructor)->NewInstance(2, params);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/nagasrinivasa/.node-gyp/10.0.0/include/node/v8.h:3851:44: note: candidate function not viable: requires single argument ‘context’, but 2 arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^
/Users/nagasrinivasa/.node-gyp/10.0.0/include/node/v8.h:3848:44: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^
…/src/odbc.cpp:1194:7: warning: ‘Call’ is deprecated [-Wdeprecated-declarations]
cb->Call(1, info);
^
…/node_modules/nan/nan.h:1617:3: note: ‘Call’ has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Localv8::Value
^
…/node_modules/nan/nan.h:98:40: note: expanded from macro ‘NAN_DEPRECATED’^
define NAN_DEPRECATED attribute((deprecated))
^
…/src/odbc.cpp:1258:87: error: too few arguments to function call, expected 2, have 1
objError->SetPrototype(Exception::Error(Nan::New(errorMessage).ToLocalChecked()));
~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/nagasrinivasa/.node-gyp/10.0.0/include/node/v8.h:3308:3: note: ‘SetPrototype’ declared here
V8_WARN_UNUSED_RESULT Maybe<bool> SetPrototype(Local<Context> context,
^
/Users/nagasrinivasa/.node-gyp/10.0.0/include/node/v8config.h:410:31: note: expanded from macro ‘V8_WARN_UNUSED_RESULT’
#define V8_WARN_UNUSED_RESULT attribute((warn_unused_result))
^
3 warnings and 3 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:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12)
gyp ERR! System Darwin 17.6.0
gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “configure” “build” “–IS_DOWNLOADED=true” “–IBM_DB_HOME=/usr/local/lib/node_modules/ibm_db/installer/clidriver”
gyp ERR! cwd /usr/local/lib/node_modules/ibm_db
gyp ERR! node -v v10.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
at ChildProcess.exithandler (child_process.js:282:12)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:947:16)
at Socket.stream.socket.on (internal/child_process.js:368:11)
at Socket.emit (events.js:182:13)
at Pipe._handle.close [as _onclose] (net.js:598:12)
killed: false,
code: 1,
signal: null,
cmd: ‘node-gyp configure build --IS_DOWNLOADED=true --IBM_DB_HOME=“$IBM_DB_HOME”’ }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ibm_db@2.4.0 install: node installer/driverInstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ibm_db@2.4.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /Users/nagasrinivasa/.npm/_logs/2018-07-14T18_11_39_997Z-debug.log
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (6 by maintainers)
Installing Xcode seemed to do the trick.
Hi, you are getting this error because of the node.js version, currently node-ibm_db does not support node.js version 10 on Mac OS, please use node < 10.X. Thanks. Our team is working on this issue, very soon we will release the compatible version with node 10.X