Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
应用程序在本地工作,在Heroku-Node.JS上崩溃_Node.js_Heroku_Express - Fatal编程技术网

应用程序在本地工作,在Heroku-Node.JS上崩溃

应用程序在本地工作,在Heroku-Node.JS上崩溃,node.js,heroku,express,Node.js,Heroku,Express,我正在运行一个简单的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

我正在运行一个简单的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

您是否将服务器端口绑定到Heroku注入的环境变量,
$port

能否发布部分代码?你想在heroku上保存文件吗?我想Jeff没有回来,但你的回答帮了我的忙,谢谢!感谢它能工作,我将app.listen(80)修改为app.listen(process.env.PORT | | 80)还有其他原因会导致这种崩溃吗?