Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cocos Creator Unavailable in colyseus.js 0.15 #134

Open
long51xy opened this issue Dec 29, 2023 · 1 comment
Open

Cocos Creator Unavailable in colyseus.js 0.15 #134

long51xy opened this issue Dec 29, 2023 · 1 comment

Comments

@long51xy
Copy link

Cocos Creator 3.81
image

Test.ts:20 TypeError: (intermediate value)(intermediate value)(intermediate value) is not a constructor
at Test.connect (Test.ts:18:27)
at Test.start (Test.ts:13:14)
at component-scheduler.ts:280:22
at OneOffInvoker._invoke (component-scheduler.ts:247:13)
at OneOffInvoker.invoke (component-scheduler.ts:162:14)
at ComponentScheduler.startPhase (component-scheduler.ts:474:27)
at Director.tick (director.ts:676:37)
at Game._updateCallback (game.ts:1039:22)
at Pacer.updateCallback [as _callback] (pacer-web.ts:95:22)
at Pacer._handleRAF (pacer-web.ts:121:22)

@human211
Copy link

human211 commented Mar 4, 2024

try

import Colyseus from 'db://colyseus-sdk/colyseus.js';
this.client = new Colyseus.Client('ws://localhost:2567');

I dont know why but this works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants