cmbot icon indicating copy to clipboard operation
cmbot copied to clipboard

Syntax error. bot.js not launching properly

Open loganspencer opened this issue 12 years ago • 2 comments

I created the bot.js file and gave it its own dir under the cmbot dir.

When launching the bot.js, I get the following errors:

./bot.js: line 1: syntax error near unexpected token (' ./bot.js: line 1:var cmbot = require('cmbot');'

Any help would be appreciated.

loganspencer avatar Feb 06 '13 17:02 loganspencer

You are trying to run the .js file directly, when you need to run node and have node load it. So, instead of ./bot.js try: node bot.js

atomjack avatar Feb 06 '13 21:02 atomjack

Buh... That got it kicking, but now its erroring out with node.js-related errors

node.js:134 throw e; // process.nextTick error, or 'error' event on first tick ^ TypeError: Cannot set property length of [ jsdom NodeList ]: contains 0 items which has only a getter at NodeList.ArraySplice (native) at Object. (/Users/logan/node_modules/cmbot/node_modules/jsdom/lib/jsdom/level1/core.js:554:30) at Object. (/Users/logan/node_modules/cmbot/node_modules/jsdom/lib/jsdom/level2/events.js:314:20) at Object.insertBefore (/Users/logan/node_modules/cmbot/node_modules/jsdom/lib/jsdom/utils.js:21:26) at Object.appendChild (/Users/logan/node_modules/cmbot/node_modules/jsdom/lib/jsdom/level1/core.js:637:17) at /Users/logan/node_modules/cmbot/node_modules/jquery/node-jquery.js:1210:15 at /Users/logan/node_modules/cmbot/node_modules/jquery/node-jquery.js:1423:2 at create (/Users/logan/node_modules/cmbot/node_modules/jquery/node-jquery.js:9059:2) at /Users/logan/node_modules/cmbot/node_modules/jquery/node-jquery.js:9065:18 at Object. (/Users/logan/node_modules/cmbot/node_modules/jquery/node-jquery.js:9067:1r

loganspencer avatar Feb 06 '13 22:02 loganspencer