【发布时间】:2018-10-13 06:37:19
【问题描述】:
我正在使用 process.env.PORT,并显示在日志中(见下文,localhost:40170,每次运行应用程序时都会更改)。此外,加载时间很快(10 秒),因为我没有在节点启动中运行任何构建过程。运行 heroku local 可以正常运行应用程序。请帮我找出可能导致此问题的原因。
这是日志:
2018-05-03T02:37:04.505544+00:00 app[web.1]: loading routes from ./modules/user.login/auth.routes.js...
2018-05-03T02:37:04.526922+00:00 app[web.1]: loading routes from ./modules/user.login/login.routes.js...
2018-05-03T02:37:04.531738+00:00 app[web.1]: loading routes from ./modules/feature.clientes/clientes.crud.routes.js...
2018-05-03T02:37:04.542719+00:00 app[web.1]: loading routes from ./modules/feature.contratos/contratos.crud.routes.js...
2018-05-03T02:37:04.552200+00:00 app[web.1]: loading routes from ./modules/feature.servicos/servicos.crud.routes.js...
2018-05-03T02:37:04.601525+00:00 app[web.1]: Server running at: http://localhost:40170
2018-05-03T02:38:01.800290+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2018-05-03T02:38:01.800290+00:00 heroku[web.1]: Stopping process with SIGKILL
2018-05-03T02:38:01.899194+00:00 heroku[web.1]: Process exited with status 137
2018-05-03T02:38:01.940085+00:00 heroku[web.1]: State changed from starting to crashed
【问题讨论】:
-
@Paul 猜对了!感谢您的提示,将尝试并报告
-
@保罗宾果游戏!我的机器上全局安装了 2 个软件包。如果你想回答它,我会标记为正确