【问题标题】:Unable to install hubot - npm dependency not met无法安装 hubot - 未满足 npm 依赖项
【发布时间】:2013-12-07 00:06:50
【问题描述】:

在尝试部署 hubot 时,npm 不断抱怨未满足的依赖项。该文档没有解释如何解决这个问题。

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

packages.json 文件包含一个依赖项列表,我认为应该自动解决这些依赖项。

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

谁能解释一下为什么 npm 不能安装 hubot?

更新

我仍然不明白为什么它不起作用,但是在运行 npm install -g hubot coffee-script 之前运行 npm install 似乎可以克服这个错误。在发布答案之前,我需要验证这一点

【问题讨论】:

  • 我已经改用 slack,它几乎可以做任何 hubot 可以做的事情。

标签: hubot


【解决方案1】:

我不知道为什么它不起作用,但我在 Centos 6.3 机器上安装 bower 时遇到了类似的问题。 Yum 安装了从 EPEL 继承的 2,但版本检测不起作用。 “sudo npm install -g inherits”安装了一个继承版本,带有工作版本报告,并且之后很好地安装了bower/grunt-cli。

【讨论】:

  • 尝试运行npm install,然后运行npm install -g hubot coffee-script。不知道为什么,但它似乎有所帮助。
  • 首先安装 npm install -g inherits 然后运行 ​​npm install -g grunt-cli 在 CentOS 上也为我工作。谢谢
  • 我来晚了,可能是nodejs版本的原因吧?通常,linux 软件包包含旧版本。当前hubot使用节点>= 0.8
  • 这也适用于 CentOS 6.5 中的 phantomjs。不知道为什么它没有被标记为答案。
  • 在 CentOS 6.5 上遇到同样的问题,在尝试 npm install -g grunt-cli 时使用 npm v1.3.6 和 node v0.10.28。并首先安装inherits,然后 grunt 工作正常。
猜你喜欢
  • 2022-07-07
  • 2019-09-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-08-29
  • 2017-11-17
  • 1970-01-01
  • 2018-05-30
相关资源
最近更新 更多