I am trying to connect to Couchbase database and I am using the sample NodeJS SDK code from Couchbase website but I am getting error. Following is my code:
var couchbase = require('couchbase')
async function main() {
const clusterConnStr = "cb.zbextwxyrtpxpht.cloud.couchbase.com"
const username = 'couchbase-admin'
const password = 'Password1234$$'
const bucketName = 'travel-sample'
console.log("Connecting to couchbase");
const cluster = await couchbase.connect(clusterConnStr, {
username: username,
password: password,
timeouts: {
kvTimeout: 10000, // milliseconds
},
})
}
// Run the main function
main()
.catch((err) => {
console.log('ERR:', err)
process.exit(1)
})
.then(process.exit)
I am getting the following error: ERR: [Error: unambiguous_timeout] { code: 14 }
Please help me.