简体   繁体   中英

Unable to install hubot - npm dependency not met

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM