smashwilson / hubot-markov

Hubot watches all, and builds a markov model from everything you say.
MIT License
61 stars 23 forks source link

TypeError: require(...) is not a function #22

Open BoxingOctopus opened 7 years ago

BoxingOctopus commented 7 years ago

Hubot won't start and throws the following error:

ubuntu@chat ~/hubot/markov $ ./bin/hubot -a lets-chat
connected
Joined Hubot Lab
[Mon Dec 05 2016 17:34:59 GMT+0000 (UTC)] ERROR Error loading scripts from npm package - TypeError: require(...) is not a function
  at Robot.loadExternalScripts (/home/ubuntu/hubot/markov/node_modules/hubot/src/robot.coffee:401:11, <js>:272:39)
  at /home/ubuntu/hubot/markov/node_modules/hubot/bin/hubot:152:11, <js>:159:26
  at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:415:3)
ElectricWarr commented 7 years ago

@TuxOtaku Did you ever fix this? Just run into the same issue myself, almost a year later.

brucellino commented 7 years ago

I just spent a few days debugging this for a project of mine. I found that the error was that I had a node package in my external-scripts which was not a hubot script, so hence the "not a function" error. Hope this helps.