成功部署后如何修复heroku h10错误

时间:2021-05-18 23:07:01

标签: reactjs heroku error-handling deployment mern

我知道有很多类似的问题。我成功地构建了我的 MERN 应用程序并将其部署到 Heroku,但部署站点只给了我一条关于应用程序错误的消息。我有一个 h10 错误/503 服务器错误。我已经运行了尾部日志,这就是我得到的(为了可读性而取出了一些代码)。它提到了一个不受支持的环境,但没有太多其他内容:

State changed from crashed to starting Starting process with command npm start> projectnameabc@0.0.0 start /app > node ./bin/www 2021-05-18T20:40:30.221160+00:00 app[web.1]: 2021-05-18T20:40:31.976752+00:00 app[web.1]: /app/node_modules/node-sass/lib/binding.js:13 2021-05-18T20:40:31.976774+00:00 app[web.1]: throw new Error(errors.unsupportedEnvironment()); 2021-05-18T20:40:31.976775+00:00 app[web.1]: ^ 2021-05-18T20:40:31.976776+00:00 app[web.1]: 2021-05-18T20:40:31.976779+00:00 app[web.1]: Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (93) 2021-05-18T20:40:31.976780+00:00 app[web.1]: For more information on which environments are supported please see: 2021-05-18T20:40:31.976781+00:00 app[web.1]: https://github.com/sass/node-sass/releases/tag/v4.14.1

2021-05-18T20:40:31.976787+00:00 app[web.1]: at Object.<anonymous> (/app/app.js:53:3) 2021-05-18T20:40:32.002656+00:00 app[web.1]: npm ERR! code ELIFECYCLE 2021-05-18T20:40:32.003178+00:00 app[web.1]: npm ERR! errno 1 2021-05-18T20:40:32.012383+00:00 app[web.1]: npm ERR! projectnameabc@0.0.0 start: 节点 ./bin/www 2021-05-18T20:40:32.012626+00:00 app[web.1]: npm ERR! Exit status 1 2021-05-18T20:40:32.012837+00:00 app[web.1]: npm ERR! 2021-05-18T20:40:32.013040+00:00 app[web.1]: npm ERR! Failed at the projectnameabc@0.0.0 start script. 2021-05-18T20:40:32.013208+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2021-05-18T20:40:32.235996+00:00 app[web.1]: 2021-05-18T20:40:32.236166+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2021-05-18T20:40:32.236414+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-05-18T20_40_32_014Z-debug.log 2021-05-18T20:40:32.320968+00:00 heroku[web.1]: Process exited with status 1 2021-05-18T20:40:32.400617+00:00 heroku[web.1]: State changed from starting to crashed 2021-05-18T22:52:33.486964+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=projectnameabc.herokuapp.com request_id=2c11685e-ac61-4e66-b15c-ed3091473583 fwd="66.41.19.188" dyno= connect= service= status=503 bytes= protocol=https

我删除并重新安装了节点模块,卸载/重新安装了 SASS(有错误)并研究了 Linux(我一直在 Mac 上工作?这是问题吗?)。我在 package.json 中所做的任何事情都无济于事,这与我在某处使用 bin/www 而不是 server.js 有关系吗?我该如何继续?

如果有帮助,我的 www 文件如下所示:

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

0 个答案:

没有答案
相关问题