Гигантская серия ошибок при развертывании Hubot
Я устанавливаю hubot в Linux и следую инструкциям, не получая ошибок.
Однако, когда я пытаюсь запустить свой 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 или какими-либо фреймворками, на которых он работает, поэтому любая информация о том, как начать устранение неполадок, будет полезна.
2 ответа
Попробуйте установить из пакета выпуска (вместо установки изgit clone
), это решило некоторые случайные проблемы для меня.
Я подозреваю, что вы не следовали разделу "Установка зависимостей" ссылки "Развертывание Hubot в UNIX", на которую вы ссылались выше. В частности, похоже, что обычная оболочка, такая как bash, пытается интерпретировать сценарий, а не интерпретатор сценариев кофе. Если вы введете
coffee
в командной строке и не получите
coffee>
подскажите, вернитесь к первой части инструкции по установке.