node.js - 连接 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()
解决方案
推荐阅读
- ios - 使用 ip 地址或其他替代方法在远程系统上设置 Xcode 服务器
- javascript - 打印所选 dom 的样式,即使我用样式标签指定了它,它也会作为带有值“”的字典出现
- button - 如何在动作方法中找到点击的按钮
- html - 如何按内容制作灵活的列?
- php - 如何使用 laravel 将表单嵌入到另一个网站
- delphi - 具有多列的 TcxComboBox
- sitefinity - TPC 中查找的占位符(门户连接器)
- reactjs - 如何为material-ui表启用键盘导航
- reactjs - 如何传递prop并实现组件中增加和减少按钮的功能
- php - 在 URL 中传递变量时为 $GET 请求创建 IF 语句