-
Notifications
You must be signed in to change notification settings - Fork 226
Open
Description
I tried to run the following code in NodeJS version >=v21.7.0
It gives the error:
unmap_chunk(): invalid pointer (Related to cpp bindings)
import { Bucket, Cluster, connect } from 'couchbase'
async function main() {
const cluster: Cluster = await connect(
'couchbases://cb.xx.cloud.couchbase.com',
{
username: 'user',
password: 'pass',
})
const bucket: Bucket = cluster.bucket('mybucket')
const collectionManager = bucket.collections();
// This line of code is triggering the error
collectionManager.createCollection("col2", "scope2", {
maxExpiry: 5000
})
}
main()But in NodeJS version <= v21.6.2 there is no error and works fine.
Output:
I actually ran into this issue while creating project by https://ottomanjs.com/
npx ottoman-cli generate- There is no warning about NodeJS version requirement which led to failure while running the project created by
ottoman-cli - Then I directly tried running sdk https://github.com/couchbase/couchnode and found this issue with
couchnode - This happens in Ubuntu as far as I tested, and not in Windows
lib/collectionmanager.tsis updated with cpp bindings in versionv4.2.8fromv4.2.7. This might be the cause asv4.2.7doesn't have this issue
System Info:
Ubuntu 24.04.2 LTS
Metadata
Metadata
Assignees
Labels
No labels