-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hour13 example04 running error with callback function undefined #2
Comments
The callback is sent by the client here Are you using the code examples from github? If so could you let me know what version of node you are running using |
Hi George, I am using code sample on github. It is hour13 example4 on windows 7 with The major error is function (data, callback), the callback is not defined Thanks, Y.H. ChangC:\1yh\download\bk\JavaScript\node_js_Redis\tysf_nodejs\hour13\example04>node C:\1yh\download\bk\JavaScript\node_js_Redis\tysf_nodejs\hour13\example04\app.js: On Thu, Nov 8, 2012 at 5:19 AM, George Ornbo [email protected]:
|
Same error happening to me here |
Hi George,
I got the following error on the hour13 example 4 of your book, I put it as the following, who define the callback function?
Thanks,
Y.H. Chang
C:\1yh\download\bk\JavaScript\node_js_Redis\tysf_nodejs\hour13\example04>node ap
p.js
info - socket.io started
debug - served static content /socket.io.js
debug - client authorized
info - handshake authorized 18904434431555541341
debug - setting request GET /socket.io/1/websocket/18904434431555541341
debug - set heartbeat interval for client 18904434431555541341
debug - client authorized for
debug - websocket writing 1::
C:\1yh\download\bk\JavaScript\node_js_Redis\tysf_nodejs\hour13\example04\app.js:
16
callback(true);
^
TypeError: undefined is not a function
at Socket. (C:\1yh\download\bk\JavaScript\node_js_Redis\tysf_node
js\hour13\example04\app.js:16:7)
at Socket.EventEmitter.emit as $emit
at SocketNamespace.handlePacket (C:\1yh\download\bk\JavaScript\node_js_Redis
\tysf_nodejs\hour13\example04\node_modules\socket.io\lib\namespace.js:335:22)
at Manager.onClientMessage (C:\1yh\download\bk\JavaScript\node_js_Redis\tysf
_nodejs\hour13\example04\node_modules\socket.io\lib\manager.js:459:38)
at WebSocket.Transport.onMessage (C:\1yh\download\bk\JavaScript\node_js_Redi
s\tysf_nodejs\hour13\example04\node_modules\socket.io\lib\transport.js:387:20)
at Parser. (C:\1yh\download\bk\JavaScript\node_js_Redis\tysf_node
js\hour13\example04\node_modules\socket.io\lib\transports\websocket\hybi-16.js:4
0:10)
at Parser.EventEmitter.emit (events.js:93:17)
at opcodeHandlers.1.finish (C:\1yh\download\bk\JavaScript\node_js_Redis\tysf
_nodejs\hour13\example04\node_modules\socket.io\lib\transports\websocket\hybi-16
.js:286:16)
at Parser.opcodeHandlers.1.expectData [as expectHandler](C:1yhdownloadbk
JavaScriptnode_js_Redistysf_nodejshour13example04node_modulessocket.ioli
btransportswebsockethybi-16.js:297:15)
at Parser.add (C:\1yh\download\bk\JavaScript\node_js_Redis\tysf_nodejs\hour1
3\example04\node_modules\socket.io\lib\transports\websocket\hybi-16.js:464:24)
C:\1yh\download\bk\JavaScript\node_js_Redis\tysf_nodejs\hour13\example04>
The text was updated successfully, but these errors were encountered: