(node:86653) UnhandledPromiseRejectionWarning: Error: **Failed to launch chrome!**
(chrome:86664): Gtk-WARNING **: 10:12:53.198: cannot open display:
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
原因是因为使用了headless:false参数,Linux是没有图形界面的所有没有办法运行。
如果puppeteer安装失败可以使用淘宝的镜像:
npm config set puppeteer_download_host = https://npm.taobao.org/mirrors

博客指出Puppeteer在Linux无法运行,原因是使用了headless:false参数,因Linux无图形界面。同时提到若Puppeteer安装失败,可使用淘宝镜像来解决。
2万+

被折叠的 条评论
为什么被折叠?



