2

trying to install Hubot with slack adapter as written here: https://github.com/slackhq/hubot-slack

in particular running this:

npm install hubot-slack --save

but I'm getting this error when trying to load the bot:

hubot -a slack

ERROR Cannot load adapter slack - Error: Cannot find module 'slack-client'

tried to perform 'npm install slack-client' but then i get another error : see another question in Hubot with slack adapter - cannot perform rtm.start

Bazuka
  • 417
  • 5
  • 16

3 Answers3

1

@slack/client needs higher npm versions. It worked for me on npm 5.3.0 but not 3.3.12. try uninstalling node and retry with latest npm version

Priyanka
  • 59
  • 2
  • 10
1

It's works for me to use stable version install hubot slack. For CentOS 7:

curl https://raw.githubusercontent.com/creationix/nvm/v0.13.1/install.sh | bash
source ~/.bash_profile
nvm list-remote
nvm install v8.4.0
nvm alias default v8.4.0
npm install -g npm
npm install -g yo generator-hubot
Eric
  • 732
  • 4
  • 13
1

I assume you are trying to execute the command inside the bin folder of hubot. Instead, go to the parent of bin folder, then execute like this: ./bin/hubot -a slack