I'm updating my project ERROR #400
-
I'm updating my project and getting this ERORR TypeError: Cannot set property 'sendPacket' of undefined I have used old uws before and now idk how to fix it. thanks for help |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
You have a recently modified repo https://github.com/ItsDavehere/MultiOgar that uses "ws" instead of "uWebSockets.js" but it has a bunch of custom defined 'sendPacket' functions in different files. If you are expecting any help you should probably post the full code or repo of what you are working on. Your error should tell you the file and line number so it should be easy to look up the problem. But there is no way to tell what you are doing from this issue which gives zero info |
Beta Was this translation helpful? Give feedback.
-
@hst-m is there anyway I can get a version uws but of 2016 ? |
Beta Was this translation helpful? Give feedback.
-
its hard to update this cause the project has been stopped since 2016 and I keep getting errors the project supported uws and ws . |
Beta Was this translation helpful? Give feedback.
-
This project is no longer a drop-in replacement to ws like it used to be in 2016. This means you have to put a bit more effort into adopting it, rather than just changing the two letters 'ws' into the three letters 'uws'. |
Beta Was this translation helpful? Give feedback.
-
I looked up old uws it says "Use of old uws releases is not recommended due to known bugs and problems". I would just re-code it with new uWS.js but it sounds like you don't know what you are doing so might as well use "ws" library instead and make it easy for yourself because that is what your repo is meant to use https://github.com/ItsDavehere/MultiOgar/blob/master/src/GameServer.js#L66 |
Beta Was this translation helpful? Give feedback.
-
@hst-m thanks for your help man I will try to recode it |
Beta Was this translation helpful? Give feedback.
This project is no longer a drop-in replacement to ws like it used to be in 2016. This means you have to put a bit more effort into adopting it, rather than just changing the two letters 'ws' into the three letters 'uws'.