5

I am trying to install node-oracledb package as I wanted to connect to an Oracle database in my node.js app. However, the installation fails all the time. As I learnt by going through the error messages the cause would be the unavailability of pre-built binary for Node v9.20. However, I cannot install the Python and compile the source code as I am in a controlled environment and is bit hard to install Python.

Is there an easy way to address this issue?

The error message is,

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
MT0
  • 143,790
  • 11
  • 59
  • 117
Aviro
  • 2,125
  • 22
  • 28

1 Answers1

1

With the insights from Christopher Jhones, I managed to resolve the issue somehow. As I don't have full control to the working machine it was bit hard to perform the normal installation.

As I was running NodeJS 9.20, the oracledb library did not supported (did not contain the pre-built binaries for that version) with the generic installation using npm install oracledb. To make it worst, I did nit have Python installed, leaving out compiling the source code to generate the binaries as an option.

Instead had followed the below steps in order to resolve the issue.

  1. Downloaded oracledb.2.2.0.tgz and oracledb-v2.2.0-node-v59-win32-x64
  2. Extract and copy the oracledb.node file to /build/Release folder
  3. Include the reference in the source code

For more details refer node-oracledb manual extraction for more details.

Hope this helps.

Aviro
  • 2,125
  • 22
  • 28