我已经设置了一个hubot服务器,版本 2.7.1. 。这是我的依赖项部分 package.json:

"dependencies": {
  "hubot": ">= 2.6.0 < 3.0.0",
  "hubot-scripts": ">= 2.5.0 < 3.0.0",
  "hubot-hipchat": "~2.6.4"
},

当它启动时,它会加载脚本 scripts/ 但似乎忽略了我放入的集合 hubot-scripts.json. 。这是该文件的第一部分:

["shipit.coffee", "sudo", "9gag", "abstract"

通过详细的启动日志,您可以看到包含了shipit.coffee(默认值之一),但其余的都不是:

[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

大约有460个文件 node_modules/hubot-scripts/src/scripts/ 目录,它包括我给出的四个 hubot-scripts.json 文件。我只能假设它没有读取该文件..或者其他的东西。

本文档差异 让我觉得我没有错过什么 有一个老问题 这也是很久以前就被修补过的。

有帮助吗?

解决方案

尝试添加 .coffee 扩展名中的所有脚本名称 hubot-scripts.json:

["shipit.coffee", "sudo.coffee", "9gag.coffee", "abstract.coffee"
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top