question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm install failing on mac osx yosemite

See original GitHub issue

npm 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:closed
  • Created 8 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bimalkjhacommented, Dec 4, 2015

@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.

0reactions
bimalkjhacommented, Feb 7, 2016

ibm_db@0.0.19 is supported for node.js v 0.10.x, 0.12.x and 4.x. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problems with npm, node-gyp and gulp on MAC OS X ...
I've problems with installing npm, node-gyp and gulp on my MAC. I need this for a Laravel project. I did my research throughout...
Read more >
Jenkins build step fails when calling “npm” on mac-os-x ...
Firstly, I installed node + npm via homebrew. A simple $ node -v and $ npm -v echoed the version v0.10.36 for node...
Read more >
Installing node.js on macOS Big Sur and earlier macOS versions
Get NodeJS installed on macOS BIg Sur and earlier OSX versions. Install Node, open a node session and upgrade Node to latest version....
Read more >
Steps to solve Node.js — NPM — Installation Issue in Mac OS ...
Step 1: To install and switch Node.js versions based on the projects, ... (The same issues occurs in latest node.js version like 8.x...
Read more >
How to Install Node.js on Mac OS - YouTube
If you're using OS X or Windows, the best way to install Node.js is to use one of the installers from the Node.js...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found