【问题标题】:Heroku application error node.js app, when deployingHeroku 应用程序错误 node.js 应用程序,部署时
【发布时间】:2017-03-30 08:36:17
【问题描述】:
    if (process.env.NODE_ENV === 'production') {
    apiOptions.server = "https://pacific-bastion-15276.herokuapp.com";

我的 npm 和 node 的版本与 packge.json 中指定的相同。

我不知道问题所在。

我尝试 heroku 重启,heroku ps:scale web=0 和 heroku ps:scale web=1,在 heroku 上设置 JWT_SECRET。 没有任何工作

有什么想法吗?我错过了什么吗?

    2017-03-29T23:34:56.224489+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
    2017-03-29T23:34:56.224809+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
    2017-03-29T23:34:56.224892+00:00 app[web.1]: npm ERR!     npm owner ls bookFace
    2017-03-29T23:34:56.224976+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
    2017-03-29T23:34:56.228404+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
    2017-03-29T23:34:56.228253+00:00 app[web.1]: 
    2017-03-29T23:34:56.228474+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
    2017-03-29T23:34:56.291775+00:00 heroku[web.1]: Process exited with status 1
    2017-03-29T23:34:56.325835+00:00 heroku[web.1]: State changed from starting to crashed
    2017-03-29T23:35:00.496063+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=pacific-bastion-15276.herokuapp.com request_id=53f989a3-f47c-48c2-8c79-1234136b53f6 fwd="80.1.102.64" dyno= connect= service= status=503 bytes= protocol=https
    2017-03-29T23:35:01.865707+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=pacific-bastion-15276.herokuapp.com request_id=e9f50e76-4c05-4b81-88d8-1be6026a2715 fwd="80.1.102.64" dyno= connect= service= status=503 bytes= protocol=https

【问题讨论】:

    标签: angularjs node.js heroku


    【解决方案1】:

    我在使用heroku & node.js 时遇到了奇怪的崩溃,其中一个与我不小心从本地计算机上传node_modules 目录有关。就我而言,它在 heroku 尝试安装依赖项时引起了冲突。

    看看是不是这样。如果这没有帮助,请为您的问题提供更多背景信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-02-04
      • 2016-02-10
      • 2021-02-12
      • 2021-05-10
      • 1970-01-01
      • 2019-12-05
      • 2016-09-10
      • 2017-02-09
      相关资源
      最近更新 更多