首页 > 解决方案 > 连接 oracledb 时出现“'TypeError: Cannot read property 'Promise' of undefined”

问题描述

我想为我的项目连接 oracle 数据库,尝试使用下面的代码,出现错误“TypeError:无法读取未定义的属性'Promise'”

使用 oracledb 包并共享打字稿代码,可能是什么问题?

import * as oracledb from 'oracledb'
export class Connectdb {
connection: any
result:any
constructor() {
    this.connection = oracledb.getConnection({
        user: "user",
        password: "pass",
        connectString: "138.21.146.216:12345/bomdevo01"
    });
}
}

new Connectdb()

标签: node.jsnode-oracledb

解决方案


推荐阅读