node.js - 没有为 null 类型定义协议方法 IDeref.-deref
问题描述
我有一个fluree数据库,这是一个好的数据库吗?我有这个问题,虽然我不知道出了什么问题,但似乎已经按照文档https://docs.flur.ee/tools/nodejs/nodejs-examples#connect所做的那样,但是会发生类似这样的错误
const flureenjs = require('@fluree/flureenjs');
const flureeServerUrl = 'http://localhost:8080';
const optionss = { keepAlive: true };
let flureeDbConn;
function flureeConnect(url, options) {
let cOpts = {};
if (options && options.keepAlive && options.keepAlive === true) {
cOpts = {
'keep-alive-fn': function() {
flureeConnect(url, options);
}
};
}
flureenjs.connect_p(url, cOpts)
.then((conn) => {
flureeDbConn=conn;
console.log(conn);
})
.catch((error) => {
console.error('Error connecting to Fluree DB', error);
// -> gracefully shutdown
// -> or add re-try logic
});
}
flureeConnect(flureeServerUrl, optionss);
flureenjs.close(flureeDbConn);
解决方案
推荐阅读
- node.js - 如何使用 DateTimePicker 在 android 中显示选定的日期和时间
- sql - PostgreSQL。INNER JOIN 不排除任何东西并给出整个表
- google-apps-script - 如何在更改之前打印值?(谷歌脚本)
- css - 将 javascript 中的 css 变量颜色动态添加到 Sass 函数
- google-sheets - 使用数组公式跳过空白值和公式的顺序行编号
- excel - 将 Excel 连接到 Heroku Postgres 数据库
- oracle - Oracle SQL Developer ERD 不会自动包含关系表
- css - 将鼠标悬停在图像上时应用变换
- python - 根据2个数据框关系在特定列中写入超过nan值的数据框列
- java - 使用 LibHoudini 在 x86 架构上运行本机 ARM 库