Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 向heroku部署环回的问题_Node.js_Heroku_Loopback - Fatal编程技术网

Node.js 向heroku部署环回的问题

Node.js 向heroku部署环回的问题,node.js,heroku,loopback,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_73cfd27

我以前在部署到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'
这是我的文件:

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)
我尝试的是:

  • 从那以后,我重新设置了我的提交,使我能够推到heroku。做那件事毫无用处。我仍然会在以前的工作代码中遇到相同的错误
  • 我还临时将我的计划从爱好升级为更高的绩效计划。当我运行heroku日志时,这消除了内存泄漏警告,但我仍然无法推送到heroku。我收到了上面给出的相同错误

  • 我还试着重新启动我的dynos。同样,没有变化:(


  • 我也遇到了同样的问题。我正在使用一个我已经部署了几十次的项目,而这个项目今天才开始。看起来可能是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,它终于通过了。

    我收到Heroku的回复,他们告诉我联系第三方buildpack创建者。在这种情况下,strongloop。我给他们发了一封电子邮件。我正在等待回复。如果我找到解决方案,我会在这里发布。如果你们运气好,请也这样做

    "engines": {
        "node": "0.10.x"
      },
    
    我改成

    "engines": {
        "node": "8.0.x"
      },
    
    它成功了。也许可以尝试使用最新的节点版本