I just pulled hubot down from github. I ran npm install
from \d\projects\hubot
and got pounded with errors. The first error may be causing the rest:
d:\projects\hubot\node_modules\hubot-hipchat\node_modules\node-xmpp\node_modules\node-xmpp-core\node_modules\node-stringprep>node "d:\Program Files\nodejs\node_modules\npm\bin\node-gyp-> bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild gyp ERR! configure error gyp ERR! stack Error: Command failed: gyp ERR! stack at ChildProcess.exithandler (child_process.js:647:15) gyp ERR! stack at ChildProcess.emit (events.js:98:17) gyp ERR! stack at maybeClose (child_process.js:755:16) gyp ERR! stack at Socket. (child_process.js:968:11) gyp ERR! stack at Socket.emit (events.js:95:17) gyp ERR! stack at Pipe.close (net.js:465:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "node" "d:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd d:\projects\hubot\node_modules\hubot-hipchat\node_modules\node-xmpp\node_modules\node-xmpp-core\node_modules\node-stringprep gyp ERR! node -v v0.10.29 gyp ERR! node-gyp -v v0.13.1 gyp ERR! not ok
The first line is pointing to a folder that does not exist on my machine:
d:\projects\hubot\node_modules\hubot-hipchat\node_modules\node-xmpp\node_modules\node-xmpp-core
node-xmpp-core does not exist. I tried installing node-xmpp-client
and node-xmpp-sever
and once again...tons of errors.
Any idea how I can get to the bottom of this mess?
Turns out I started with the wrong command.
Mac Setup
After pulling down the repo, the right command to start with is:
sudo npm install -g yo generator-hubot
Other stuff you need:
This is where things get tricky.
(yo hubot command installs hubot!)
Now switch back to the root directory \wherever\hubot
switch back to the created directory \wherever\hubot\myhubot
bin/hubot
(installs npm dependencies, loads scripts, launches hubot)This will put you at a prompt and there will be a bunch of garbage on the screen. Hit <enter>
. Now you get the correct prompt...
Hubot>
and you can type "hubot help" to test him out.
If hubot does not respond to commands check to make sure you ran bin/hubot
from the directory you created \wherever\hubot\myhubot
. You can run bin/hubot
from the root, but the prompt won't respond to commands.
Full instructions for setup were found on github.
Windows Setup
Basically the same thing. Don't use sudo before any of the commands listed above. You also need two additional packages before Hubot will run. I recommend installing these first:
Write some scripts to make him do interesting things.
\wherever\hubot\myhubot\scripts\example.coffee
is a good place to start