发布部署环回到heroku的问题

时间:2016-09-05 19:40:05

标签: node.js heroku loopback

我以前没有问题部署到heroku但是稍后我会开始在终端中看到这个错误,当我做了git push heroku master:

remote: 400557 silly vacuum-fs removing /tmp/build_73cfd27afe73fd280337c3fd2cd3c9bf/vendor/node/bin/slc
remote: 400558 silly vacuum-fs quitting because other entries in /tmp/build_73cfd27afe73fd280337c3fd2cd3c9bf/vendor/node/bin
remote: 400559 info postuninstall strongloop@6.0.1
remote: 400560 silly gentlyRm /tmp/build_73cfd27afe73fd280337c3fd2cd3c9bf/vendor/node/lib/node_modules/strongloop is being purged from base /tmp/build_73cfd27afe73fd280337c3fd2cd3c9bf/vendor/node
remote: 400561 verbose gentlyRm don't care about contents; nuking /tmp/build_73cfd27afe73fd280337c3fd2cd3c9bf/vendor/node/lib/node_modules/strongloop
remote: 400562 silly vacuum-fs purging /tmp/build_73cfd27afe73fd280337c3fd2cd3c9bf/vendor/node/lib/node_modules/strongloop
remote: 400563 silly vacuum-fs quitting because other entries in /tmp/build_73cfd27afe73fd280337c3fd2cd3c9bf/vendor/node/lib/node_modules
remote:  !     Push rejected, failed to compile Node.js app.
remote: 
remote:  !     Push failed
remote: Verifying deploy....
remote: 
remote: !       Push rejected to myapp.
remote: 
To https://git.heroku.com/myapp.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/myapp.git'

这是我的Procfile:

web: slc run 

的package.json:

{
  "name": "myapp",
  "version": "1.0.0",
  "main": "server/server.js",
  "scripts": {
    "start": "node .",
    "pretest": "eslint .",
    "posttest": "nsp check"
  },
  "engines": {
    "node": "0.10.x"
  },
  "dependencies": {
    "async-series": "0.0.1",
    "compression": "^1.0.3",
    "cors": "^2.5.2",
    "helmet": "^1.3.0",
    "loopback": "^2.22.0",
    "loopback-boot": "^2.6.5",
    "loopback-component-explorer": "^2.4.0",
    "loopback-connector-mongodb": "^1.15.2",
    "loopback-datasource-juggler": "^2.39.0",
    "serve-favicon": "^2.0.1",
    "strong-error-handler": "^1.0.1"
  },
  "devDependencies": {
    "eslint": "^2.5.3",
    "nsp": "^2.1.0"
  },
  "repository": {
    "type": "",
    "url": ""
  },
  "license": "UNLICENSED",
  "description": "myapp"
}

当我运行heroku日志时,我收到一些内存问题,我不确定这是否与我的问题有关:

2016-09-05T19:23:21.380834+00:00 heroku[web.1]: Process running mem=935M(182.8%)
2016-09-05T19:23:21.380938+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2016-09-05T19:23:42.483862+00:00 heroku[web.1]: Process running mem=936M(183.0%)
2016-09-05T19:23:42.483938+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2016-09-05T19:24:03.606013+00:00 heroku[web.1]: Process running mem=936M(182.8%)
2016-09-05T19:24:03.606059+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)

我做了什么:

  1. 我已经将我的提交重置回到能够推送到heroku的位置。这样做没有做任何事。我仍然使用以前的工作代码得到同样的错误。
  2. 我还暂时将我的计划从业余爱好升级为更高绩效计划。当我运行heroku日志时,这摆脱了内存泄漏警告,但我仍然无法推送到heroku。我收到了上面给出的相同错误。

  3. 我也试过重启我的dynos。再一次没有变化:(

3 个答案:

答案 0 :(得分:1)

我遇到了同样的问题。我使用的是我已经部署了数十次的项目,而这一点刚刚开始。看起来它可能是Heroku的结局。你碰巧找到了解决办法吗?

更新:发现修复!我得到了确切的错误,如下面的答案:

remote: 399727 error path /tmp/build_2b4a4006d967fde144d63244a50616b8/vendor/node/lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/bin/lb-ng

我今天在Heroku上阅读过总是将你的构建工具保存在package.json中的依赖项中,记得我的全局安装,所以我运行了这个命令:

npm install --save loopback-sdk-angular-cli

然后,我把它推到了Heroku,它终于完成了。

答案 1 :(得分:0)

我从heroku回复过来,他们告诉我联系第三方buildpack创建者。在这种情况下strongloop。我给他们发了一封电子邮件我等着收听。如果我找到解决方案,我会在这里发布。如果你们有运气,请同样做!

答案 2 :(得分:0)

"engines": {
    "node": "0.10.x"
  },

我改为

"engines": {
    "node": "8.0.x"
  },

它有效。也许尝试使用最新的节点版本。