Closed circy closed 1 year ago
@circy Add ibm_db
as a dependency in your package.json file, deploy and install the app on server. I hope you have network access for server where app can download ibm_db from npm and generate bindings file.
If still not working, then please share more details about the issue and your configuration. The rule is ibm_db should be installed locally for use by the application. If you paste any error details, it would be helpful to understand the situation. Thanks.
@bimalkjha On the server everything works, I have the package also in my package.json, I just want the lib local not to try to find the cli driver and the bindings, because I can't build it here locally on the developer machine but only on the server. but it's unfortunately not possible to start my application locally when I imported the lib, because it searches the bindings and doesn't find them.
@circy If your local application is trying to import ibm_db and use it, it need bindings file. Without bindings and clidriver, it can't be used and your application can't run. Its same like not installing ibm_db under your app. If you do not install and try to use it, how will it work? Only way is to comment code in your app which imports ibm_db.
You can avoid download of clidriver. There is a way. Somehow, you download operating system specific clidriver from https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli in your system, untar/unzip it which will give clidriver.
Now, set system level environment variable IBM_DB_HOME=
@circy Please let us know if we can close this issue. Thanks.
Unfortunately I have the problem that I have no possibility to install the cli driver and the bondings locally. Due to regulations in my network, it is only possible to use the driver and bindings on the server. Unfortunately, I can not start my app locally, because it does not find the bindings, which is not bad for me, because I mock the database locally. I just want the lib to be included but don't want to use it. I just want my app to start successfully and not get the messages that it can't find the bindings. Is that possible? is there a trick?