Error TS2339: Property 'groupsList' does not exist on type 'Nakama'

Good morning,

I’m trying to write a Typescript function that retrive the group list.
I exactly copied the script example in documentation.

Here the code:

let groupName = "Heroic";
let langTag = "en";
let members = 10;
let open = true;
let limit = 100;

let results: nkruntime.GroupList = {};
try {
  results = nk.groupsList(groupName, langTag, open, members, limit);
} catch (error) {
  // Handle error
}

When I try to compile the cose the compiler returns:
error TS2339: Property ‘groupsList’ does not exist on type ‘Nakama’.

What’s wrong?

thank you

Ok, It’s wrong version of runtime downloaded.

I rebuild: package-lock.json with npm i --package-lock-only

SOLVED

Hi @solidsnakeit glad you solved your issue :slight_smile: let us know if you have any other questions! I will mark this thread as solved.