Can't use “mutateIn” with couchbase node sdk

I’m trying to implement this bit of code:

bucket.mutate_in('some_doc',
                  SD.array_append('some.array', 'Hello', 'World',
                                  create_parents=True))

Which I’m getting from here: https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html

I’m also using this: https://github.com/couchbase/couchnode

I can’t import “subdocument” from couchbase, because I get an error saying it doesn’t exist, and when I try to use the mutateIn method (or the mutate_in method) I also get an error saying that mutateIn is not a property of Bucket (which it should be).

I would like to append an item to an array (or create an array if it doesn’t exists and then append an item to it) for one of my documents in my couchbase bucket.

Could you specify version of the client and the server?

The server is version 4.6.0-3453 and the client is 2.3.3.

Problem fixed: the issue was a missing type definition for mutateIn in the @types/couchbase module. So the problem wasn’t with the code, the client or the server.