I have very little node js experience and need some help why i am getting that error. If you could plz run the code to see the error and give some advice, it would be appreciated.
Found the problem.
On line 85
}); needs to be moved to line 114. The reason for the error is because your event handlers were outside of the connection handler. As a result, the
socket object was not the clients socket, but what you set it to on line 3 (which has no method call