node.js - 无法在 Heroku 上部署 Hubot

标签 node.js heroku hubot

我上个月(2 月 13 日)使用 hubot 2.4.6 在 Heroku 上部署了一个 Hubot 实例。

今天我想添加一个新脚本,但在部署回 heroku 时出现编译错误。 在更新之前,我尝试按照 wiki 说明部署一个全新的 hubot 导致完全相同的错误,这里是日志:

$ git push heroku master
Counting objects: 23, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (19/19), done.
Writing objects: 100% (23/23), 10.58 KiB, done.
Total 23 (delta 0), reused 0 (delta 0)

-----> Node.js app detected
-----> Resolving engine versions
       Using Node.js version: 0.10.0
       Using npm version: 1.1.65
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm
       npm http GET https://registry.npmjs.org/optparse/1.0.3
       npm http GET https://registry.npmjs.org/hubot
       npm http GET https://registry.npmjs.org/hubot-scripts
       npm http 200 https://registry.npmjs.org/optparse/1.0.3
       npm http GET https://registry.npmjs.org/optparse/-/optparse-1.0.3.tgz
       npm http 200 https://registry.npmjs.org/hubot-scripts
       npm http GET https://registry.npmjs.org/hubot-scripts/-/hubot-scripts-2.4.2.tgz
       npm http 200 https://registry.npmjs.org/hubot
       npm http GET https://registry.npmjs.org/hubot/-/hubot-2.4.8.tgz
       npm http 200 https://registry.npmjs.org/optparse/-/optparse-1.0.3.tgz
       npm http 200 https://registry.npmjs.org/hubot-scripts/-/hubot-scripts-2.4.2.tgz
       npm http 200 https://registry.npmjs.org/hubot/-/hubot-2.4.8.tgz
       npm ERR! cb() never called!
       npm ERR! not ok code 0
 !     Failed to install --production dependencies with npm
 !     Heroku push rejected, failed to compile Node.js app

To git@heroku.com:radiant-taiga-1655.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:radiant-taiga-1655.git'

现在 Hubot 是 2.4.8。 有人遇到同样的问题还是我遗漏了什么?

最佳答案

我们遇到了同样的问题。我们通过将 package.json 中的 Node 版本更改为 0.8.21 来修复它。

"engines": {
  "node": "= 0.8.21",
  "npm": "1.1.x"
}

关于node.js - 无法在 Heroku 上部署 Hubot,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15381657/

相关文章:

git - 将不同的分支推送到 Heroku

node.js - Hubot Windows 服务

node.js - 正确比较 Node 中的数据存储键

javascript - nodejs如何将onchange事件添加到字符串

Heroku CLI卡在Windows 10上

java - 通过heroku拉/推数据库

node.js - 如何使用nodejs从密码查询中获取对象?

javascript - 连接到 Node 服务器自动查找掩码

node.js - 文件执行权限在 Linux 中不断变回

node.js - Hubot - 从文件加载环境变量