Hello,
I have following code running on RHAT8 with node v14.16.0 . I am using latest Node SDK 3.2.0 which results in segmentation fault as shown below.
const couchbase = require(‘couchbase’);
//const DB_URL= ‘couchbase://localhost’;
const DB_URL = ‘http://127.0.0.1:8091’;
const DB_USER = ‘’;
const DB_PASSWORD = ‘’;
const DB_BUCKET = ‘folio-postings’ ;
const connOptions = {
username: DB_USER,
password: DB_PASSWORD
};
const cluster = new couchbase.Cluster(DB_URL, connOptions);
const bucket = cluster.bucket(DB_BUCKET);
cluster.diagnostics().then(res => {
console.log("[Couchbase] - Connection successful");
}).catch(err => {
console.log('[Couchbase] - Connection error => ', err);
});
const collection = bucket.defaultCollection();
collection.get(“folio_81231111”, (err, rows) => {
if (err) {
console.log(err);
} else {
console.log(rows.value);
}
})
When I run above code I get segmentation fault:
[Couchbase] - Connection successful
Segmentation fault (core dumped)
If I run the same exact code and setting with Node.js SDK 3.1.1, it works fine. I see that Couchbase 6.5 is compatible with SDK 3.2.0 . Please advise what might be the issue.
Thank you for your help.
Ben