I need to connect node js with oracle db in MAC Terminal. So, for the installation tried the steps in the link https://github.com/nearinfinity/node-oracle I have set the below paths after copying the instant client files from oracle link to a folder in path /usr/InstantClient/
$ export OCI_INCLUDE_DIR=/usr/InstantClient/sdk/include
$ export OCI_LIB_DIR=/usr/InstantClient/
$ export LD_LIBRARY_PATH=/usr/InstantClient/
But, getting error like Error: At least one file failed to compile.
Am I doing any mistakes in setting the path or environment variables? Can anyone provide me steps to install oracle module to use with node in MAC terminal? Thanks
EDIT: The error list I get is as follows on npm install db-oracle
:
unameits-Mac-mini:InstantClient vinod$ npm install db-oracle
npm http GET https://registry.npmjs.org/db-oracle
npm http 304 https://registry.npmjs.org/db-oracle
> [email protected] install /usr/InstantClient/node_modules/db-oracle
> node-waf configure build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local/Cellar/node/0.8.11
Checking for header occi.h : Missing include files for OCI
/usr/InstantClient/node_modules/db-oracle/wscript:42: error: the configuration failed (see '/usr/InstantClient/node_modules/db-oracle/build/config.log')
> [email protected] preuninstall /usr/InstantClient/node_modules/db-oracle
> rm -rf build/*
npm ERR! [email protected] install: `node-waf configure build`
npm ERR! `sh "-c" "node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the db-oracle package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls db-oracle
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 11.3.0
npm ERR! command "/usr/local/Cellar/node/0.8.11/bin/node" "/usr/local/bin/npm" "install" "db-oracle"
npm ERR! cwd /usr/InstantClient
npm ERR! node -v v0.8.11
npm ERR! npm -v 1.1.62
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/InstantClient/npm-debug.log
npm ERR! not ok code 0
The error list I get is as follows on npm install db-oracle
unameits-Mac-mini:InstantClient vinod$ npm install db-oracle npm http GET https://registry.npmjs.org/db-oracle npm http 304 https://registry.npmjs.org/db-oracle
[email protected] install /usr/InstantClient/node_modules/db-oracle node-waf configure build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local/Cellar/node/0.8.11
Checking for header occi.h : Missing include files for OCI
/usr/InstantClient/node_modules/db-oracle/wscript:42: error: the configuration failed (see '/usr/InstantClient/node_modules/db-oracle/build/config.log')
[email protected] preuninstall /usr/InstantClient/node_modules/db-oracle rm -rf build/*
npm ERR! [email protected] install: node-waf configure build
npm ERR! sh "-c" "node-waf configure build"
failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the db-oracle package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls db-oracle
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 11.3.0
npm ERR! command "/usr/local/Cellar/node/0.8.11/bin/node" "/usr/local/bin/npm" "install" "db-oracle"
npm ERR! cwd /usr/InstantClient
npm ERR! node -v v0.8.11
npm ERR! npm -v 1.1.62
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/InstantClient/npm-debug.log
npm ERR! not ok code 0
Error: At least one file failed to compile
. I repeat: please post the exact error message you are getting. If it really is in a previous question or answer, link to it. Feel free to include the last command you ran at the terminal and all of the output it generated, as that may help us. – Luke Woodward Oct 5 '12 at 10:42