【发布时间】:2021-07-26 13:02:20
【问题描述】:
我用 puppeteer 做了一个刮板,但我没有指定任何端口来服务它。它只是运行并抓取数据并使用process.exit() 命令退出。
我使用 cli 将它部署到 heroku,但运行后抛出错误:
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch.
Stopping process with SIGKILL
Process exited with status 137
怎么了?
【问题讨论】:
-
您是否应用了此处提到的所有内容:github.com/puppeteer/puppeteer/blob/main/docs/…? (安装了heroku构建包,添加了启动标志)
-
是的,我添加了 buidpack
-
尚不清楚您的刮板应该何时运行。您可能需要使用调度程序或时钟。两者的例子都在Puppeteer on Heroku Error R10 (Boot timeout) Node (webscraping app)