【问题标题】:Why am I getting Heroku error h10 upon successful deploy为什么我在成功部署后收到 Heroku 错误 h10
【发布时间】:2021-08-09 05:21:51
【问题描述】:

我成功地将我的 MERN 应用程序部署到 Heroku,但在访问该站点时,它显示应用程序错误。

我的尾巴记录了这个:Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime 和错误代码 h10/状态 503。

我使用的是 Mac,并且反复更新了 Sass、Node Sass 中间件、NPM 以及建议的所有内容。

bin/www 看起来像这样:

var port = normalizePort(process.env.PORT || '3000');
app.set('port', port);

是我的 package.json 吗?我也在那里尝试了多种方法,但到目前为止没有任何效果。

【问题讨论】:

    标签: reactjs heroku deployment


    【解决方案1】:

    如果您忘记设置启动脚本,则会在 Node.js 环境中引发此错误。 Heroku 使用此脚本来启动您的应用程序,因此如果缺少它,它会抛出 H10-App 崩溃错误代码消息。
    这可以通过在 package.json 中设置启动脚本来解决。例如

    "scripts": {
        "start": "node index.js"
    }
    

    dev.to will let you know in detail about this issue.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-05-10
      • 2021-03-20
      • 1970-01-01
      • 2013-05-18
      • 2019-06-12
      • 2017-06-24
      • 2022-01-20
      • 1970-01-01
      相关资源
      最近更新 更多