Answer the question
In order to leave comments, you need to log in
NodeJS + Socket.IO - chat, an error occurs when starting the server. Why?
I am writing a multi-room chat based on the book " Node.JS in action ", 2015 . When starting the server - error " TypeError: undefined is not a function ". I rechecked the book, downloaded the same example from the network, rechecked - everything is fine. I am writing for the first time. Please, help me figure it out.
Answer the question
In order to leave comments, you need to log in
Sorry, but in my opinion, before learning nodejs, you first need to learn just js. I'm sorry if that sounded too harsh.
This error occurs when client is not a method, but undefined. Pour, please, the previous 4 lines.
Books in the furnace until they come out everything changes every day, take examples from the online documentation and
the socket.io/demos/chat page
Read the error message. You are calling an undefined function io.sockets.client Needed
:
io.sockets.clients
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question