Delete irrelevant parts of this template.
Describe exactly what you did and what you want to happen.
Use the questions at the bottom of this template as a guide.
Use Markdown syntax, particularly for code blocks: see https://help.github.com/articles/basic-writing-and-formatting-syntax/
See https://www.oracle.com/support/assurance/vulnerability-remediation/reporting-security-vulnerabilities.html for how to report security issues.
Use a gist for screen output and logs: see https://gist.github.com/
Do not paste long output into this issue
Review the install instructions at https://github.com/oracle/node-oracledb/blob/master/INSTALL.md
Review your output and logs. Google any errors
Try to install in a different way. Try some potential solutions.
For Node 4 onwards, you need a compiler with C++11 support.
Did the error indicate a network connection issue? Do you need to set http_proxy?
Try running npm cache clean and deleting the node_modules/oracledb directory.
Do you have an old version of node-gyp installed? Try updating it. Also try deleting $HOME/.node-gyp or equivalent.
gcc --versionYou need a build environment to compile the source code. Based on the error message you posted it seems like you to don't have one. Did you follow the install instructions here?
An easy method of installing the necessary build tools (Visual Studio and Python) is by using the windows-build-tools npm module which installs it for you.
After you have the build environment set oracledb should install correctly assuming you have your environment variables set correctly. In your above message, I noticed you mentioned that you have them set as system variables but you didn't mention what directory you have them pointing to. Be sure OCI_LIB_DIR points to the sdk\lib\msvc directory within your Instant Client folder and that OCI_INC_DIR points to sdk\include directory within your Instant Client folder.
After oracledb installs be sure that you have the Instant Client directory listed within your PATH environment variable. This will be needed to use oracledb within your app.
And if all else fails you could always utilize my oracledb fork via npm install oracledb-pb which takes care of everything for you. It downloads Instant Client and packages it within your app, has all the binaries prebuilt so no build environment is needed and it also takes care of all the environment variables so none of that is needed either. Good luck!
Hi,
I cannot install node-oracledb in my runtime environment.
While browsing the issues, I realized that the root cause would be unavailability of pre-built binaries for Node 9.2 version.
However, I cannot download the source and compile it as I am inside a controlled environment where new installations like Python needs levels of approvals.
Is there a way I can download the pre-built binaries for Node 9.2 or else a working copy of oracledb installation?
`> node package/oracledbinstall.js
oracledb Beginning installation
oracledb ERR! NJS-054: Binary build/Release/oracledb.node was not installed.
oracledb ERR! Pre-built binary packages are not available for Node.js v9.2.0 (NODE_MODULE_VERSION="59")
oracledb ERR! Failed to install binary package oracledb-v3.0.1-node-abi59-win32-x64.gz
oracledb ERR! self signed certificate in certificate chain
oracledb ERR! For help see https://oracle.github.io/node-oracledb/INSTALL.html#troubleshooting`
@ugbandula Because of the need to promote Node.js versions that are maintained, and the high number of those versions (currently four) that we need to test and support ourselves, we have to stop building binaries for unsupported ones as each new LTS is released. In short form: I'm not planning on building new node-oracledb binaries for Node 9. And node-oracledb binaries for Node 11 will no longer be released when Node 12 is shipped.
Having said that, node-oracledb 2.2 had Node.js 9 binaries. Have you tried that old version?
Thanks for the quick turnaround. Could you advise me how to install the node-oracledb 2.2 binaries for NodeJS 9.
From the command line:
npm install [email protected]
In a package.json file
"dependencies": {
"oracledb": "2.2.0"
}
See https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#installingoldvers
Tried these approaches before. This is the error I am getting when I tried this.
Probably now the root cause might be something else.
oracledb Beginning installation
oracledb Verifying installation
oracledb Continuing installation
oracledb ERR! NJS-054: Binary build/Release/oracledb.node was not installed.
oracledb ERR! Failed to install binary package oracledb-v2.2.0-node-v59-win32-x64.gz
oracledb ERR! self signed certificate in certificate chain
oracledb ERR! For help see https://oracle.github.io/node-oracledb/INSTALL.html#troubleshooting
Have you set http_proxy? For 2.x - 3.0 you need this in addition to any npm proxy.
Possibly your network is locked down. You could try insecure things like
export NODE_TLS_REJECT_UNAUTHORIZED=0
npm config set strict-ssl false
but officially I can't recommend them.
Or maybe you don't have access to download from GitHub (or S3 storage). If you can get to https://github.com/oracle/node-oracledb/releases/tag/v2.2.0 then you can try downloading the generic & binary packages manually and follow https://github.com/oracle/node-oracledb/blob/v2.2.0/INSTALL.md#manualextraction
Thanks. The second approach solves my issue.
I manually downloaded the mentioned libraries/packages and install them.
Thanks for guiding me towards a solution.
I'm glad you got it going.
I'm sure you had good reasons for using Node.js 9, but if only you were on a LTS release, look at all the changes in node-oracledb since 2.2 that you could be using: https://github.com/oracle/node-oracledb/blob/master/CHANGELOG.md :)