hubot doesn't load my hubot-scripts configuration
-
21-12-2019 - |
Question
I've set up a hubot server, version 2.7.1
. Here's the dependencies section of my package.json
:
"dependencies": {
"hubot": ">= 2.6.0 < 3.0.0",
"hubot-scripts": ">= 2.5.0 < 3.0.0",
"hubot-hipchat": "~2.6.4"
},
When it starts, it loads the scripts in scripts/
but seems to ignore the collection I've put in hubot-scripts.json
. Here's the first part of that file:
["shipit.coffee", "sudo", "9gag", "abstract"
With verbose startup logs, you can see that shipit.coffee is included (one of the defaults), but none of the rest are:
[Tue Feb 25 2014 10:59:46 GMT-0800 (PST)] DEBUG Loading hubot-scripts from /path/node_modules/hubot-scripts/src/scripts
[Tue Feb 25 2014 10:59:46 GMT-0800 (PST)] DEBUG Parsing help for /path/node_modules/hubot-scripts/src/scripts/shipit.coffee
[Tue Feb 25 2014 10:59:46 GMT-0800 (PST)] DEBUG Loading external-scripts from npm packages
There are about 460 files in the node_modules/hubot-scripts/src/scripts/
directory, and it includes the four given in my hubot-scripts.json
file. All I can assume is that it isn't reading that file.. or something.
This documentation diff makes me think I haven't missed something, there's an old issue that was patched eons ago too.
Solution
Try adding .coffee
extension to all your script names in hubot-scripts.json
:
["shipit.coffee", "sudo.coffee", "9gag.coffee", "abstract.coffee"