Running hubot
kanusoni opened this issue · comments
When i am running hubot with command .\bin\hubot in the root directory it' giving me error like this:-
ERROR Cannot load adapter -p - Error: Cannot find module 'hubot--p'
Require stack:
- C:\Users\jarvis\node_modules\hubot\src\robot.js
- C:\Usersjarvis\node_modules\hubot\es2015.js
- C:\User\jarvis\node_modules\hubot\index.js
- C:\Users\jarvis\node_modules\hubot\bin\hubot.js
- C:\Users\jarvis\node_modules\hubot\bin\hubot
could you please help me to resolve this error. Thanks.
I don't have a Windows OS machine to verify it works at this moment but doing as below should work for you:
npm install -g yo generator-hubot
yo hubot --adapter=slack
set HUBOT_SLACK_TOKEN=xoxb-***
bin\hubot --adapter slack
References:
@seratch when i was running first command that you mentioned its giving me some warnings:-
npm WARN notsup Unsupported engine for got@5.7.1: wanted: {"node":">=0.10.0 <7"} (current: {"node":"12.14.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: got@5.7.1
is it necessary to install node <7 while installing hubot on it?
@kanusoni No, you can use Node 10+ for your Hubot apps. If you have some trouble with the yeoman generator, you don't need to use it. If you already have a project, just try bin\hubot --adapter slack
to boot your app.
@seratch i tried bin\hubot --adapter slack command it's giving me error :-
ERROR No token provided to Hubot
ERROR Error: listen EACCES: permission denied 0.0.0.0:8080
So, you need to set an env variable as I mentioned above.
set HUBOT_SLACK_TOKEN=xoxb-*** (your own token here)
ERROR No token provided to Hubot
This error message indicates the absence of a bot token.
@kanusoni
I've verified the following on PowerShell works.
$env:HUBOT_SLACK_TOKEN="xoxb-***"
bin\hubot --adapter slack
@kanusoni Could you close this question when you verify it works?