# Error creating a tournament

**URL:** <https://forum.heroiclabs.com/t/error-creating-a-tournament/3299>\
**Category:** Runtime Framework\
**Tags:** server-framework\
**Created:** [November 28, 2022, 10:08am UTC](https://forum.heroiclabs.com/t/error-creating-a-tournament/3299 "2022-11-28T10:08:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clement\_A\_Madbox](https://avatars.discourse-cdn.com/v4/letter/c/bc8723/32.png) [@Clement\_A\_Madbox](https://forum.heroiclabs.com/u/Clement_A_Madbox)\
**Post date:** [November 28, 2022, 10:08am UTC](https://forum.heroiclabs.com/t/error-creating-a-tournament/3299/1 "2022-11-28T10:08:46Z")

</div>

Hello there, I’m trying to create a tournament via server runtime code but I get an error while creating it.

Here is the error : TypeError: expects boolean at [github.com/heroiclabs/nakama/v3/server.(\*runtimeJavascriptNakamaModule).tournamentCreate.func1](http://github.com/heroiclabs/nakama/v3/server.(*runtimeJavascriptNakamaModule).tournamentCreate.func1) (native)"}

From what I saw the typescript signature doesn’t have the authoritative param anymore and the go signature needs it.

I’m running Nakama version 3.14.0.  
I tried downgrading to Nakama 3.13.0 but I still have the error.

Thanks in advance for your help.

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [November 28, 2022, 11:12am UTC](https://forum.heroiclabs.com/t/error-creating-a-tournament/3299/2 "2022-11-28T11:12:20Z")

</div>

Hello @Clement_A_Madbox, it’s likely you’re using an outdated version of the typescript definitions, please update them from `master` at [GitHub - heroiclabs/nakama-common: The runtime framework for Nakama server.](https://github.com/heroiclabs/nakama-common/) .

---

<div class="post-metadata">

**Author:** ![Clement\_A\_Madbox](https://avatars.discourse-cdn.com/v4/letter/c/bc8723/32.png) [@Clement\_A\_Madbox](https://forum.heroiclabs.com/u/Clement_A_Madbox)\
**Post date:** [November 28, 2022, 12:42pm UTC](https://forum.heroiclabs.com/t/error-creating-a-tournament/3299/3 "2022-11-28T12:42:37Z")

</div>

Thanks for the answer, I’m not sure how to update the nakama common as I have this in my package.json  
“dependencies”: {  
“nakama-runtime”: “github:heroiclabs/nakama-common”  
},

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [November 28, 2022, 1:30pm UTC](https://forum.heroiclabs.com/t/error-creating-a-tournament/3299/4 "2022-11-28T13:30:58Z")

</div>

Delete the `node-modules` folder, as well as the package.json and package-lock.json files and run `npm i 'https://github.com/heroiclabs/nakama-common#master`, then recompile.

---

<div class="post-metadata">

**Author:** ![Clement\_A\_Madbox](https://avatars.discourse-cdn.com/v4/letter/c/bc8723/32.png) [@Clement\_A\_Madbox](https://forum.heroiclabs.com/u/Clement_A_Madbox)\
**Post date:** [November 28, 2022, 4:37pm UTC](https://forum.heroiclabs.com/t/error-creating-a-tournament/3299/5 "2022-11-28T16:37:23Z")

</div>

Thanks a lot it solved my problems!

---

<div class="post-metadata">

**Author:** ![Clement\_A\_Madbox](https://avatars.discourse-cdn.com/v4/letter/c/bc8723/32.png) [@Clement\_A\_Madbox](https://forum.heroiclabs.com/u/Clement_A_Madbox)\
**Post date:** [November 28, 2022, 5:05pm UTC](https://forum.heroiclabs.com/t/error-creating-a-tournament/3299/6 "2022-11-28T17:05:22Z")

</div>

I have another error when updating nakama-common to the last version when creating a leaderboard I get this  
nakama | {“level”:“fatal”,“ts”:“2022-11-28T16:54:13.754Z”,“caller”:“main.go:158”,“msg”:“Failed initializing runtime modules”,“error”:"TypeError: expects sort order to be ‘asc’ or ‘desc’\n\tat [github.com/heroiclabs/nakama/v3/server.(\*runtimeJavascriptNakamaModule).leaderboardCreate.func1](http://github.com/heroiclabs/nakama/v3/server.(*runtimeJavascriptNakamaModule).leaderboardCreate.func1)  
signature for SortOrder is not correct.  
I use Nakama 3.14.0 and the lastest nakama-common

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [November 28, 2022, 6:07pm UTC](https://forum.heroiclabs.com/t/error-creating-a-tournament/3299/7 "2022-11-28T18:07:06Z")

</div>

The TS definitions master branch reflects some changes to be included in Nakama `3.15.0` (to be released soon). We shall improve the versioning around the typescript definitions in the future, for now I’d suggest you do not use the provided ENUM but pass in the respective sort order string representation as ‘asc’ or ‘desc’.

---

<div class="post-metadata">

**Author:** ![Clement\_A\_Madbox](https://avatars.discourse-cdn.com/v4/letter/c/bc8723/32.png) [@Clement\_A\_Madbox](https://forum.heroiclabs.com/u/Clement_A_Madbox)\
**Post date:** [November 29, 2022, 7:42am UTC](https://forum.heroiclabs.com/t/error-creating-a-tournament/3299/8 "2022-11-29T07:42:58Z")

</div>

I rolled back to tag 1.24 of nakama-common and it seems ok

---

<div class="post-metadata">

**Author:** ![seiferxiii](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/seiferxiii/32/985_2.png) [@seiferxiii](https://forum.heroiclabs.com/u/seiferxiii)\
**Post date:** [December 23, 2022, 6:35am UTC](https://forum.heroiclabs.com/t/error-creating-a-tournament/3299/9 "2022-12-23T06:35:14Z")

</div>

I’m experiencing the same problem right now. I am using all the latest versions of nakama-runtime, nakama-common.

I tried to set is as string, but typescript won’t allow it.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/4/4e8d05e4238ad7e05612103d7db17efa166fb34d.png)

Edit: For now i have added `// @ts-ignore` to the line to have typescript ignore the string provided on sortOrder and scoreOperator
