ibmdb / node-ibm_db

IBM DB2 and IBM Informix bindings for node
MIT License
188 stars 151 forks source link

Error: Could not locate the bindings file #924

Closed orizzontiholding closed 1 year ago

orizzontiholding commented 1 year ago

I've configured my system and installed ibm_db library that will be a dependency of an electron app. After installation process suing npm, I've done a cd to open the library folder and I've used the command npm i -electron="13.0.0" to start the installation of the needed cli driver. The download will work fine and the driver is installed. I've also installed vs compiler and all seems to work good during the setup. My main problem is when I try to start my electron app, I will always get this error

Error: Could not locate the bindings file. Tried:
 → C:\Users\xxx\Desktop\R\node_modules\ibm_db\build\odbc_bindings.node
 → C:\Users\xxx\Desktop\R\node_modules\ibm_db\build\Debug\odbc_bindings.node
 → C:\Users\xxx\Desktop\R\node_modules\ibm_db\build\Release\odbc_bindings.node
 → C:\Users\xxx\Desktop\R\node_modules\ibm_db\out\Debug\odbc_bindings.node
 → C:\Users\xxx\Desktop\R\node_modules\ibm_db\Debug\odbc_bindings.node
 → C:\Users\xxx\Desktop\R\node_modules\ibm_db\out\Release\odbc_bindings.node
 → C:\Users\xxx\Desktop\R\node_modules\ibm_db\Release\odbc_bindings.node
 → C:\Users\xxx\Desktop\R\node_modules\ibm_db\build\default\odbc_bindings.node
 → C:\Users\xxx\Desktop\R\node_modules\ibm_db\compiled\14.16.0\win32\x64\odbc_bindings.node
 → C:\Users\xxx\Desktop\R\node_modules\ibm_db\addon-build\release\install-root\odbc_bindings.node
 → C:\Users\xxx\Desktop\R\node_modules\ibm_db\addon-build\debug\install-root\odbc_bindings.node
 → C:\Users\xxx\Desktop\R\node_modules\ibm_db\addon-build\default\install-root\odbc_bindings.node
 → C:\Users\xxx\Desktop\R\node_modules\ibm_db\lib\binding\node-v89-win32-x64\odbc_bindings.node
    at bindings (C:\Users\xxx\Desktop\R\node_modules\bindings\bindings.js:126:9)
    at Object.<anonymous> (C:\Users\xxx\Desktop\R\node_modules\ibm_db\lib\odbc.js:57:31)
    at Module._compile (internal/modules/cjs/loader.js:1078:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
    at Module.load (internal/modules/cjs/loader.js:935:32)
    at Module._load (internal/modules/cjs/loader.js:776:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12684)
    at Module.require (internal/modules/cjs/loader.js:959:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at eval (webpack:///external_%22require(\%22ibm_db\%22)%22?:1:18)

I'm on a windows 11 with node 16.16.0 installed only for the electron app, my main version of node installed in the system is node 18.12.1

Is there any way to fix this problem?

bimalkjha commented 1 year ago

Its duplicate of issue #923 . Thanks.