【问题标题】:Giant series of errors when deploying Hubot部署 Hubot 时出现大量错误
【发布时间】:2012-09-26 17:07:40
【问题描述】:

我正在Linux上安装hubot,并关注the instructions,没有收到任何错误。

但是,当我尝试实际运行我的 hubot 时,我遇到了问题。首先,我尝试根据链接教程末尾的说明对 hubot 进行守护。 start hubot 返回错误 start: Unknown job: hubot。于是我备份并尝试了/opt/hubot/bin/hubot --name Ro\ Bot --adapter campfire,得到了这一系列的错误:

 /opt/hubot/bin/hubot: line 11: Hubot: command not found
/opt/hubot/bin/hubot: line 12: Fs: command not found
/opt/hubot/bin/hubot: line 13: Path: command not found
/opt/hubot/bin/hubot: line 14: HTTP: command not found
/opt/hubot/bin/hubot: line 15: Creator: command not found
/opt/hubot/bin/hubot: line 16: OptParse: command not found
/opt/hubot/bin/hubot: line 18: Switches: command not found
/opt/hubot/bin/hubot: line 19: [: missing `]'
/opt/hubot/bin/hubot: line 20: [: missing `]'
/opt/hubot/bin/hubot: line 21: [: missing `]'
/opt/hubot/bin/hubot: line 22: [: missing `]'
/opt/hubot/bin/hubot: line 23: [: missing `]'
/opt/hubot/bin/hubot: line 24: [: missing `]'
/opt/hubot/bin/hubot: line 25: [: missing `]'
/opt/hubot/bin/hubot: line 26: [: --version,: binary operator expected
/opt/hubot/bin/hubot: line 27: ]: command not found
/opt/hubot/bin/hubot: line 29: Options: command not found
/opt/hubot/bin/hubot: line 30: adapter:: command not found
/opt/hubot/bin/hubot: line 31: alias:: command not found
/opt/hubot/bin/hubot: line 32: create:: command not found
/opt/hubot/bin/hubot: line 33: enableHttpd:: command not found
/opt/hubot/bin/hubot: line 34: name:: command not found
/opt/hubot/bin/hubot: line 35: path:: command not found
/opt/hubot/bin/hubot: line 37: syntax error near unexpected token `('
/opt/hubot/bin/hubot: line 37: `Parser = new OptParse.OptionParser(Switches)'

尝试从发布包安装而不是在 git 中克隆会导致过程早期出现不同的错误:

root@server:/opt# wget https://github.com/downloads/github/hubot/hubot-2.2.0.tar.gz
root@server:/opt# npm install

npm ERR! Couldn't read dependencies.

npm ERR! Error: ENOENT, no such file or directory '/opt/package.json'
npm ERR! System Linux 2.6.35.4-rscloud
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /opt
npm ERR! node -v v0.6.9
npm ERR! npm -v 1.1.0-3
npm ERR! path /opt/package.json
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory '/opt/package.json'
npm ERR! errno {}
npm not ok

我尝试了npm cache clean,但没有帮助。

我不知道该怎么做,而且我对 Hubot 或它运行的任何框架都不是很熟悉,因此任何有关如何开始排除故障的信息都会有所帮助。

【问题讨论】:

    标签: github chatbot hubot campfire


    【解决方案1】:

    尝试从the release package 安装(而不是从git clone 安装),这为我解决了一些随机问题。

    【讨论】:

    • 我试过这个,得到不同的错误。编辑操作以包含信息。
    • 在你的wget之后,你需要解压.tgz (gunzip, tar -xvf),它会解压到一个“hubot”目录,然后npm install在那个新目录中。 HTH
    【解决方案2】:

    我怀疑您没有遵循上面引用的“将 Hubot 部署到 UNIX”链接的“安装依赖项”部分。具体来说,像 bash 这样的常规 shell 似乎试图解释脚本而不是咖啡脚本解释器。如果你输入

    coffee
    

    在你的 shell 提示下,不要得到 ​​p>

    coffee>
    

    提示,重温安装说明的第一部分。

    【讨论】:

    • 我确实遵循了“安装依赖项”部分,当我在 shell 提示符下键入 coffee 时,我确实得到了 coffee> 作为我的提示符。我应该在coffee> 提示符下运行我的 Hubot 命令吗?
    猜你喜欢
    • 2018-12-07
    • 1970-01-01
    • 2022-01-09
    • 2015-08-07
    • 2014-11-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多