W
W
WorldDelete .2016-05-05 15:07:59
Node.js
WorldDelete ., 2016-05-05 15:07:59

Node.js script not running?

Hello again. Throws an error when trying to start the bot. Chat bot dubtrack.fm
Below is what the console gives me.
C:\NodeJS\bot\bot.js:16
bot.connect(config.roomName);
^
TypeError: Cannot read property 'connect' of undefined
at C:\NodeJS\bot\bot.js:16:8
at C:\NodeJS\bot\node_modules\dubapi\index.js:51:25
at Object.callback ( C:\NodeJS\bot\node_modules\dubapi\lib\actionHandler.js:28:20)
at Request. (C:\NodeJS\bot\node_modules\dubapi\lib\requestHandler.js:113:65)
at emitTwo (events.js:111:20)
at Request.emit (events.js:191:7)
at Request. (C:\NodeJS\bot\node_modules\request\request.js:1067:10)
at emitOne(events.js:101:20)
at Request.emit(events.js:188:7)
at IncomingMessage. (C:\NodeJS\bot\node_modules\request\request.js:988:12)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js :926:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9) Bot
code doesn't fit. If needed, I can PM him.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Belyaev, 2016-05-05
@bingo347

They wrote to you in English

Cannot read property 'connect' of undefined
and even pointed out the place where the error occurred
C:\NodeJS\bot\bot.js:16
.
The bot variable contains the value undefined
Undefined and null cannot have properties

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question