hubotio / generator-hubot

Hubot generator for Yeoman
MIT License
155 stars 91 forks source link

generator-hubot@next + nodemon + babel #95

Closed cirpo closed 7 years ago

cirpo commented 7 years ago

Hi, I installed hubot through generator-hubot@next, everything seems work fine with the default installation.

I wanted to use nodemon and babel so I changed the bin script to point directly to the node_module/hubot/bin/hubot.js:

#!/bin/sh

set -e

npm install
export PATH="node_modules/.bin:node_modules/hubot/node_modules/.bin:$PATH"

nodemon --exec babel-node --presets=es2015 -- node_modules/hubot/bin/hubot.js --name "slack-bot" "$@"

but I get the following error:

$: HUBOT_SLACK_TOKEN=xoxb-dsadsadssdasdi ./bin/hubot_dev --adapter slack
up to date in 1.717s
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `babel-node --presets=es2015 node_modules/hubot/bin/hubot.js --name slack-bot --adapter slack`
[Sun Aug 13 2017 11:12:20 GMT+0100 (BST)] ERROR Cannot load adapter slack - Error: Cannot find module 'hubot-slack'
[nodemon] app crashed - waiting for file changes before starting...

how can I use nodemon and babel properly in this case?