19

While trying to deploy hubot, npm keeps complaining about unmet dependencies. The documentation does not explain how to get around this.

yum install npm --enablerepo=epel
yum install nodejs --enablerepo=epel
cd /opt
git clone https://github.com/github/hubot.git
cd hubot/
./bin/hubot --create acebot
npm install -g hubot coffee-script
...

npm http 200 https://registry.npmjs.org/formidable/-/formidable-1.0.14.tgz
npm http 200 https://registry.npmjs.org/uid2/-/uid2-0.0.2.tgz
/usr/bin/hubot -> /usr/lib/node_modules/hubot/bin/hubot
npm WARN unmet dependency /usr/lib/node_modules/block-stream requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/fstream requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/fstream-ignore requires inherits@'2' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/fstream-npm requires inherits@'2' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/glob requires inherits@'2' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/npmconf requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/tar requires inherits@'2' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
coffee-script@1.6.3 /usr/lib/node_modules/coffee-script

the packages.json file contains a list of dependencies, which I assume should automatically be resolved.

  "dependencies": {
    "coffee-script":      "1.6.3",
    "optparse":           "1.0.4",
    "scoped-http-client": "0.9.8",
    "log":                "1.4.0",
    "express":            "3.3.4"
  },

Can anyone shed some light on why npm can't install hubot?

Update

I still don't understand why it wasn't working, but running npm install before running npm install -g hubot coffee-script seems to get past this error. I'll need to verify this before posting an answer

spuder
  • 17,437
  • 19
  • 87
  • 153

1 Answers1

46

I don't know WHY it didn't work but I was having a similar problem installing bower on a Centos 6.3 machine. Yum had installed inherits 2 from EPEL but version detection wasn't working. "sudo npm install -g inherits" installed a version of inherits with working version reporting and bower/grunt-cli installed fine afterwards.

PaulDelys
  • 461
  • 3
  • 2
  • 2
    Try running `npm install` then `npm install -g hubot coffee-script`. Not sure why, but it seems to have helped. – spuder Dec 26 '13 at 03:08
  • 14
    First installing `npm install -g inherits` and then running `npm install -g grunt-cli` worked for me too on CentOS. Thanks – Robin van Baalen Jun 06 '14 at 14:23
  • 1
    I'm a bit late, but maybe it's due to nodejs version? Often, the linux packages contain old versions. Current hubot uses node >= 0.8 – H_I Jun 21 '14 at 11:09
  • This worked for phantomjs in CentOS 6.5 as well. Not sure why it's not marked as the answer. – Fmstrat Jul 15 '14 at 20:39
  • Had the same problem on CentOS 6.5, using npm v1.3.6 and node v0.10.28 while trying to `npm install -g grunt-cli`. And installing `inherits` first, then grunt worked fine. – Anthony Hatzopoulos Aug 01 '14 at 17:34