<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[colyseus.js: server error: registeredHandler.klass is not a constructor]]></title><description><![CDATA[<p>Hi there ! I finally succeed at running my server and my client with webpack and typescript ... but now i have a wierd error in chrome :</p>
<p><code>colyseus.js: server error: registeredHandler.klass is not a constructor</code></p>
<p>Does any one know what is it and where is it from...</p>
<p>I googled it and i found NOTHING it's scare me a lot ...</p>
]]></description><link>http://discuss.colyseus.io/topic/92/colyseus-js-server-error-registeredhandler-klass-is-not-a-constructor</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 17:04:43 GMT</lastBuildDate><atom:link href="http://discuss.colyseus.io/topic/92.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 08 Jun 2018 08:41:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to colyseus.js: server error: registeredHandler.klass is not a constructor on Fri, 08 Jun 2018 10:25:16 GMT]]></title><description><![CDATA[<p>Hi there ! I finally succeed at running my server and my client with webpack and typescript ... but now i have a wierd error in chrome :</p>
<p><code>colyseus.js: server error: registeredHandler.klass is not a constructor</code></p>
<p>Does any one know what is it and where is it from...</p>
<p>I googled it and i found NOTHING it's scare me a lot ...</p>
]]></description><link>http://discuss.colyseus.io/post/297</link><guid isPermaLink="true">http://discuss.colyseus.io/post/297</guid><dc:creator><![CDATA[erochOnGit]]></dc:creator><pubDate>Fri, 08 Jun 2018 10:25:16 GMT</pubDate></item><item><title><![CDATA[Reply to colyseus.js: server error: registeredHandler.klass is not a constructor on Invalid Date]]></title><description><![CDATA[<p>Hi <a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/91">@erochongit</a>,</p>
<p>Make sure to use <code>&quot;target&quot;:&quot;es2015&quot;</code> in the <code>tsconfig.json</code> on your server:</p>
<pre><code>{
    &quot;compilerOptions&quot;: {
        &quot;target&quot;: &quot;es2015&quot;,
    }
    // ...
}
</code></pre>
]]></description><link>http://discuss.colyseus.io/post/301</link><guid isPermaLink="true">http://discuss.colyseus.io/post/301</guid><dc:creator><![CDATA[endel]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to colyseus.js: server error: registeredHandler.klass is not a constructor on Fri, 08 Jun 2018 14:45:51 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/1">@endel</a> i did this it's not correct  ?</p>
<pre><code>{
  &quot;compilerOptions&quot;: {
    &quot;module&quot;: &quot;commonjs&quot;,
    &quot;target&quot;: &quot;es6&quot;,
    &quot;noImplicitAny&quot;: false,
    &quot;sourceMap&quot;: true,
    &quot;outDir&quot;: &quot;build&quot;
  },
  &quot;exclude&quot;: [
    &quot;node_modules&quot;,
    &quot;**/*.spec.ts&quot;,
    &quot;**/*.test.ts&quot;
  ],
  &quot;include&quot;: [
    &quot;src/**/*.ts&quot;
  ]
}

</code></pre>
<p>EDIT : I have the same error when i add &quot;target&quot;: &quot;es2015&quot;, to my tsconfig.json.</p>
]]></description><link>http://discuss.colyseus.io/post/302</link><guid isPermaLink="true">http://discuss.colyseus.io/post/302</guid><dc:creator><![CDATA[erochOnGit]]></dc:creator><pubDate>Fri, 08 Jun 2018 14:45:51 GMT</pubDate></item><item><title><![CDATA[Reply to colyseus.js: server error: registeredHandler.klass is not a constructor on Invalid Date]]></title><description><![CDATA[<p>same error here, any solution ?</p>
]]></description><link>http://discuss.colyseus.io/post/316</link><guid isPermaLink="true">http://discuss.colyseus.io/post/316</guid><dc:creator><![CDATA[Diederik Van Remoortere]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to colyseus.js: server error: registeredHandler.klass is not a constructor on Thu, 14 Jun 2018 16:44:16 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/96">@Diederik-Van-Remoortere</a> <a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/91">@erochOnGit</a></p>
<p>Please see this thread <a href="https://discuss.colyseus.io/topic/57/room-error-solved/3" rel="nofollow">https://discuss.colyseus.io/topic/57/room-error-solved/3</a></p>
]]></description><link>http://discuss.colyseus.io/post/317</link><guid isPermaLink="true">http://discuss.colyseus.io/post/317</guid><dc:creator><![CDATA[endel]]></dc:creator><pubDate>Thu, 14 Jun 2018 16:44:16 GMT</pubDate></item><item><title><![CDATA[Reply to colyseus.js: server error: registeredHandler.klass is not a constructor on Invalid Date]]></title><description><![CDATA[<p>If that doesn't solve the issue, it would be nice if you could provide an example of how to reproduce the issue. Cheers!</p>
]]></description><link>http://discuss.colyseus.io/post/318</link><guid isPermaLink="true">http://discuss.colyseus.io/post/318</guid><dc:creator><![CDATA[endel]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to colyseus.js: server error: registeredHandler.klass is not a constructor on Wed, 20 Jun 2018 12:14:01 GMT]]></title><description><![CDATA[<p>Sorry for the late reply!</p>
<p>I just finished a project where i'm able to run client but having .klass issue ...</p>
<p><strong>please use develop branch</strong></p>
<p>here it is :<br />
<a href="https://github.com/erochOnGit/nodeGame" rel="nofollow">https://github.com/erochOnGit/nodeGame</a></p>
<p>If you are not able to run it properly tell me i'll help you</p>
]]></description><link>http://discuss.colyseus.io/post/343</link><guid isPermaLink="true">http://discuss.colyseus.io/post/343</guid><dc:creator><![CDATA[erochOnGit]]></dc:creator><pubDate>Wed, 20 Jun 2018 12:14:01 GMT</pubDate></item><item><title><![CDATA[Reply to colyseus.js: server error: registeredHandler.klass is not a constructor on Invalid Date]]></title><description><![CDATA[<p>Hi <a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/91">@erochOnGit</a>, I see. Thanks for sharing your project.</p>
<p>The issue you're having is because you're using both <code>commonjs</code> and <code>es6</code> module systems at the same time. A common practice is to either always use <code>require</code> + <code>module.exports</code>, or <code>import</code> + <code>export</code>, never both.</p>
<p>You can fix the issue by using <code>import { MyRoom } from &quot;./defaultRoom.ts&quot;</code> <a href="https://github.com/erochOnGit/nodeGame/blob/0d3759a2aba12b07e047edbad9457c833b7a8689/src/server/index.ts#L3" rel="nofollow">here</a>. Or by exporting the room using <code>commonjs</code>, by using <code>module.exports = class MyRoom {...</code></p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/96">@Diederik-Van-Remoortere</a> is that your scenario as well?</p>
]]></description><link>http://discuss.colyseus.io/post/346</link><guid isPermaLink="true">http://discuss.colyseus.io/post/346</guid><dc:creator><![CDATA[endel]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to colyseus.js: server error: registeredHandler.klass is not a constructor on Thu, 21 Jun 2018 19:52:39 GMT]]></title><description><![CDATA[<p>Hi all,</p>
<p>I'm just starting out with your framework and I'm rather new to ES6 as well, so I'm probably a bit confused.</p>
<p>The things I'm confused about are:</p>
<ul>
<li>should I use babel ? if yes, which version ? <a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/91">@erochOnGit</a> in your nodeGame repo you are using @babel which seems to be a beta version of babel, is this intentionally ?</li>
<li>which babel preset should I use ?</li>
<li>should I use type script or javascript ? (i prefer the later...)</li>
<li>I 'd prefer to write my code using the ES6 syntax (i.e. using import i.s.o require()...), your examples are also written in it...</li>
</ul>
<p>It might be a good idea to update your getting started section on the website as it is currently a bit weird to clone a git repo to start a new project instead of using npm install commands.... I'm just being frank here ;)</p>
<p>I stumbled upon your project by accident for a multiplayer demo game I'm currently co-working on with some colleagues, and it would be nice to continue using Colyseus for it...</p>
<p>Thanks for your responses, apologies for the late reply.</p>
<p>Best Regards,<br />
Diederik</p>
]]></description><link>http://discuss.colyseus.io/post/348</link><guid isPermaLink="true">http://discuss.colyseus.io/post/348</guid><dc:creator><![CDATA[Diederik Van Remoortere]]></dc:creator><pubDate>Thu, 21 Jun 2018 19:52:39 GMT</pubDate></item><item><title><![CDATA[Reply to colyseus.js: server error: registeredHandler.klass is not a constructor on Fri, 22 Jun 2018 15:51:57 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/96">@diederik-van-remoortere</a></p>
<p>You must use typescript, I tried with babel but it was wrong.<br />
In my repo I forgot to remove babel from the package.json</p>
]]></description><link>http://discuss.colyseus.io/post/351</link><guid isPermaLink="true">http://discuss.colyseus.io/post/351</guid><dc:creator><![CDATA[erochOnGit]]></dc:creator><pubDate>Fri, 22 Jun 2018 15:51:57 GMT</pubDate></item><item><title><![CDATA[Reply to colyseus.js: server error: registeredHandler.klass is not a constructor on Invalid Date]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/1">@endel</a> said in <a href="/post/346">colyseus.js: server error: registeredHandler.klass is not a constructor</a>:</p>
<blockquote>
<p>Or by exporting the room usin</p>
</blockquote>
<p>I'll try it the week end and come back to you later.<br />
Thx for the help so far.</p>
]]></description><link>http://discuss.colyseus.io/post/352</link><guid isPermaLink="true">http://discuss.colyseus.io/post/352</guid><dc:creator><![CDATA[erochOnGit]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>