A
A
Alexander Khilinichenko2015-06-08 19:24:56
JavaScript
Alexander Khilinichenko, 2015-06-08 19:24:56

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.
1f21d8c0201d4a789156c389ad5aeefd.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Valentin Dubrovsky, 2015-06-08
@matroskin13

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.

T
Timur Shemsedinov, 2015-06-08
@MarcusAurelius

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

I
Igor Aleksandrovich, 2015-06-08
@tyanigor

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 question

Ask a Question

731 491 924 answers to any question