gpt4 book ai didi

node.js - 应用程序在本地运行,在 Heroku - Node.JS 上崩溃

转载 作者:搜寻专家 更新时间:2023-11-01 00:13:40 24 4
gpt4 key购买 nike

我正在运行一个简单的 express 应用程序,它从 S3 中提取静态文件,并在本地运行良好,但在 Heroku 上,它不断崩溃,出现有关权限被拒绝的警告,但没有更多信息。

有什么方法可以找出导致权限错误的原因吗?

从部署到崩溃的 Heroku 日志:

2011-12-26T22:41:14+00:00 heroku[slugc]: Slug compilation started
2011-12-26T22:41:19+00:00 heroku[api]: Deploy 20d0578 by jeffandersen@gmail.com
2011-12-26T22:41:19+00:00 heroku[api]: Release v20 created by jeffandersen@gmail.com
2011-12-26T22:41:20+00:00 heroku[web.1]: State changed from crashed to created
2011-12-26T22:41:20+00:00 heroku[web.1]: State changed from created to starting
2011-12-26T22:41:21+00:00 heroku[slugc]: Slug compilation finished
2011-12-26T22:41:22+00:00 heroku[web.1]: Starting process with command `node server.js`
2011-12-26T22:41:23+00:00 app[web.1]: info - socket.io started
2011-12-26T22:41:23+00:00 app[web.1]: warn - error raised: Error: EACCES, Permission denied
2011-12-26T22:41:24+00:00 heroku[web.1]: State changed from starting to crashed
2011-12-26T22:41:25+00:00 heroku[web.1]: Process exited

最佳答案

您是否将服务器端口绑定(bind)到 Heroku 注入(inject)的环境变量 $PORT

关于node.js - 应用程序在本地运行,在 Heroku - Node.JS 上崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8639690/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com