oracledb 连接问题:无法读取未定义的属性(读取"_getConnection")



节点oracle连接问题。它之前在同一应用程序中已经连接,但现在不起作用。我更新了节点版本。

连接字符串没有问题,因为相同的连接工作在同一服务器上的其他应用程序。

节点- v = v16.9.1
npm - v = v7.21.1

包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"
},

代码:

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)
)
)
`
};

结果错误:

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

请检查您的连接,希望您只创建一个连接,因为mongojs是

相关内容

  • 没有找到相关文章

最新更新