-
Notifications
You must be signed in to change notification settings - Fork 10
Cant run in Node #44
Comments
Unfortunatly this client was designing only for browsers, there are plans to build node version but it would be as separate project. |
Thanks, ASAP. :) |
That looks pretty good :) |
So is this now a part of the release? because I still get this error
|
@slidenerd not yet, i am planning to include that in next release for now you can use fork. Make sure u use uws version 10.148.1 without ^ at the front. |
Will be in version 4.0 (probable separate repository or different deploy build to do not ship useless deps and code with browser version) |
btw, putting this before you require clusterws-client-js lets this work in node:
|
@aequasi that is a good solutions :) |
You should also be able to do |
@aequasi that one will not work out as ws.onopen = function() {
// some logic
} you need to write: ws.on("open", () => {
// some logic
}) i will probably write a simple wrapper for |
I have release version 0.9.0 of global.window = {WebSocket: require('@clusterws/cws').WebSocket} |
@goriunov I'm not sure if this is related to this, but I'm using
The server receives messages just fine, but if I send something back to the client I get that error, the message is always a JSON object. I haven't tried the library in the browser, but I do want to use this to write some server-side tests. |
@vladikus10 can you try updating |
@goriunov Updated and the error is gone, thanks! |
@goriunov In Node.js, https://github.com/ClusterWS/ClusterWS-Client-JS/blob/next/src/index.ts#L221-L226 |
@fundon thanks, i have not yet tested with Node, will have look soon :) |
@fundon just released new version alpha 2 with that fix, thank you :) |
Submitting
Details
The text was updated successfully, but these errors were encountered: