0
I am trying to connect the database to the nodejs with the Knex, but when making a call on the connection I get the following error,
Unhandledpromiserejectionwarning: Error: DPI-1047: Cannot locate a 64-bit Oracle Client library: "C: oracle product 10.2.0 client_1 bin oci.dll is not the correct Architecture".
My connection string is this.
client: "oracledb",
connection: {
host : process.env.DB_HOST,
database: process.env.DB_NAME,
user: process.env.DB_USER,
password: process.env.DB_PASS,
port: process.env.DB_PORT
},
the database is not localhost is already hosted on the server.
This error cannot be caused by incopatibility of the Node and database architecture? Take a look here, but what he says is that the architecture of Node and oracle has to be the same. He states in the documentation: Run
node -p process.arch
and make sure to use 64-bit or 32-bit Oracle client Libraries to match the Node.js Architecture. " Use this command `Node -p "process.Arch`` to see which Node Voce architecture you use– Cmte Cardeal
the problem was solved but with another solution, the problem was the instance that I did not pass in the connection, for some reason the knex was not recognizing the database as instance. , thank you for your help
– Jhonatas Ribeiro