Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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

share|improve this question
    
Can anyone please help? –  vinod Oct 5 '12 at 10:25
    
You say you are getting an error 'like' "Error: at least one file failed to compile". Vague error details make it difficult for us to be able to help you. Please post the exact error you are getting. –  Luke Woodward Oct 5 '12 at 10:32
    
Hi Luke, Thanks but, I have mentioned that error in my previous post itself. Please see –  vinod Oct 5 '12 at 10:35
    
What previous post? I've been through all of your node.js questions and I can't found an error message. I cannot believe that the only error message you're getting is 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
    
Normally, if you want to do anything with Oracle, you need to define ORACLE_HOME. In your case probably ORACLE_HOME=/usr/InstantClient –  ik_zelf Oct 5 '12 at 10:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.