cmbot
cmbot copied to clipboard
Syntax error. bot.js not launching properly
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.
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
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.