oracledb connection issue : Cannot read properties of undefined (reading '_getConnection')

Viewed 468

node oracle connection issue. It is already connected before in the same application but not working now. I updated the node version.

No issue in the connection string because the same connection working other application in the same server.

node -v =v16.9.1
npm -v =v7.21.1

package json:

"dependencies": {
    "@types/oracledb": "^5.1.0",
    "dotenv": "^8.2.0",
    "group-by": "0.0.1",
    "moment": "^2.29.1",
    "oracledb": "^5.1.0",
    "pg-promise": "^10.8.6",
    "tedious": "^9.2.3",
    "tedious-connection-pool": "^1.0.5"
  },

Code :

export const getOracleConnection = async () => {
   try {
      return await getConnection(POSTargetConfig)
   } catch (error) {
      console.log("Errorrrrrrrrr:  " + error.message)
      await TraceLog("Error", error.message);
      await onRejected();
   }
}

export const POSTargetConfig = {
  user: "name",
  password: 'pass',
  connectString: `(DESCRIPTION =
                  (ADDRESS = (PROTOCOL = TCP)(HOST =server.amazonaws.com)(PORT =1521))
                  (CONNECT_DATA =
                    (SERVER = DEDICATED)
                    (SID =devid)
                  )
                )
                `
};

Result Error:

 Errorrrrrrrrr:  Cannot read properties of undefined (reading '_getConnection')

1 Answers

please check your connectivity hope you only one connection create becuase mongojs is

Related