# Javascript/Typescript Runtime TypeError in match\_loop

**URL:** <https://forum.heroiclabs.com/t/javascript-typescript-runtime-typeerror-in-match-loop/5384>\
**Category:** Runtime Framework\
**Tags:** server-framework, typescript\
**Created:** [June 20, 2024, 6:14pm UTC](https://forum.heroiclabs.com/t/javascript-typescript-runtime-typeerror-in-match-loop/5384 "2024-06-20T18:14:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ancoder2009](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/ancoder2009/32/2199_2.png) [@Ancoder2009](https://forum.heroiclabs.com/u/Ancoder2009)\
**Post date:** [June 20, 2024, 6:14pm UTC](https://forum.heroiclabs.com/t/javascript-typescript-runtime-typeerror-in-match-loop/5384/1 "2024-06-20T18:14:17Z")

</div>

My Godot Client Disconnects whenever I get to a certain state in the match loop.  
The logs give this error:

```auto
{"level":"warn","ts":"2024-06-20T17:50:42.019Z","caller":"server/match_handler.go:292","msg":"Stopping match after error from match_loop execution","mid":"883d344d-41f6-494c-adf6-35c4af340c46","tick":392,"error":"TypeError: Cannot assign to read only property '__assign' at index.js:3:16(8)"}

```

In index.js

```js
"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {

```

Nakama Docker with Godot 4 SDK  
TS/JS for server runtime

---

<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:** [June 20, 2024, 6:22pm UTC](https://forum.heroiclabs.com/t/javascript-typescript-runtime-typeerror-in-match-loop/5384/2 "2024-06-20T18:22:14Z")

</div>

Please see this config: [Configuration - Heroic Labs Documentation](https://heroiclabs.com/docs/nakama/getting-started/configuration/#runtime.js_read_only_globals)

Ensure that you’re relying on global variables as this is bad practice and can cause unpredictable behavior across the JS VMs.
