Skip to content

Error: NJS-045: cannot load the oracle-db add-on binary #898

@TikiLobel

Description

@TikiLobel
  • Node.js version: 8.11.1
  • 64-bit computer
  • node-oracledb version: 2.0.15
  • Instant Client version: 1.0.1 ( I think 12_2 but I cannot check...)
    I used npm install instantclient to install, and i did it within the folder that my project resides (I opened a terminal from the folder in Visual Studio)
  • I set the path variable through the Control Panel: C:\users\tlobel\source\repos\Attempt1\Attempt1\node_modules\instantclient;C:\Users\tlobel\Downloads\VC_redist.x64;C:\Python27;C:\Python27\Scripts;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Users\tlobel\AppData\Roaming\npm;

(In the path, I am unsure about whether to include 'node_modules' to instant client, since I see there is also once outside of the folder, which includes most of the contents - inside node_modules the instant client folder only has instantclient.js and a few other things)

When I try and run my code, which consists of:

const oracledb = require('oracledb')

I get the error:

_**Error: NJS-045: cannot load the oracledb add-on binary for Node.js 8.11.1 (win32, x64)
Cannot load C:\Users\tlobel\source\repos\Attempt1\Attempt1\node_modules\oracledb\build\Release\oracledb.node
DPI-1050: Oracle Client library must be at version 11.2 or higher
Node-oracledb installation instructions: https://github.com/oracle/node-oracledb/blob/master/INSTALL.md
You must have 64-bit Oracle client libraries in your PATH environment variable.
If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from
http://www.oracle.com/technetwork/topics/winx64soft-089540.html
A Microsoft Visual Studio Redistributable suitable for your Oracle client library version must be available.

at Object.<anonymous> (C:\Users\tlobel\source\repos\Attempt1\Attempt1\node_modules\oracledb\lib\oracledb.js:68:13)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Users\tlobel\source\repos\Attempt1\Attempt1\node_modules\oracledb\index.js:1:80)
at Module._compile (module.js:652:30)**_

My project set up looks like this:

project

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions