Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: add configuration option or specific error message while loading oracledb.node module #790

Closed
radio-miskovice opened this issue Nov 14, 2017 · 2 comments

Comments

@radio-miskovice
Copy link

Hello, there is an error, repeated by many, causing that on Windows (and maybe other systems, too) simple require like this:

const oracle = require( 'oracledb' ) ;

ends with the following confusing error message:

Error: The specified module could not be found.
\\?\C:\DEV\dbtools\node_modules\oracledb\build\Release\oracledb.node
    at Object.Module._extensions..node (module.js:664:18)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\DEV\@EIT\dbtools\node_modules\oracledb\lib\oracledb.js:35:19)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)

The problem is that it is not oracledb.node that can't be found, but oci.dll and the root cause is that PATH does not include the directory where oci.dll is located.

I would like to suggest to implement at least one of these features:

  • add more specific error message when loading oracledb.node, so that it properly identifies it is not the node module that is missing, but one of the libraries it references,
  • add some option into module configuration that would allow to detect or specify the location of oci.dll either implicitly during install, or explicitly during module load.

Answer the following questions:

  1. What is your version of Node.js? node 8.9.1 win32 x64

  2. What version of node-oracledb are you using? version 1.13.1

  3. What is the version of your Oracle client (e.g. Instant Client)? How was it installed? Where it is installed? version 12.2.0.1 win32 x64 installed from ZIP into c:\oracle\instantclient_12_2

  4. What is the version of Oracle Database?
    Does not matter, because the module does not load at all.

  5. What is your OS and version?
    Windows 10 (1511) Professional x64

  6. What compiler version did you use? For example, with GCC, run gcc --version
    windows build tools 1.3.2 (installed via npm install -g windows-build-tools)

  7. What environment variables did you set? How exactly did you set them?

PATH=... (does not contain oracle instantclient directory)
ORACLE_HOME=C:\oracle\instantclient_12_2
@cjbj
Copy link
Member

cjbj commented Nov 14, 2017

Check https://github.com/oracle/node-oracledb/blob/dev-2.0/lib/oracledb.js and see if that has the enough extra diagnostics. The v2 build has changed a bit due to the use of ODPI-C. We are also working on #18, which will help (@dmcghan and I synched up on the installer again today)

I'd like to have Instant Client MSIs, which would be able to set PATH and check for the correct VS Redistributable. Maybe sometime this will happen.

@cjbj
Copy link
Member

cjbj commented Nov 20, 2017

The recent v2.0.14-dev tag includes the proposed binary install scripts, which also try and lead people in the right direction about installing dependencies.

I'm going to close this issue since the problem is understood and we know the steps to take. Thanks for reporting it.

@cjbj cjbj closed this as completed Nov 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants