鍍金池/ 問答/HTML/ puppeteer錯(cuò)誤 Error: Failed to launch chro

puppeteer錯(cuò)誤 Error: Failed to launch chrome!

使用puppeteer來生成pdf文件,運(yùn)動(dòng)時(shí),提示: /home/ubuntu/projects/dd/node_modules/_puppeteer@1.6.0@puppeteer/.local-chromium/linux-571375/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory

錯(cuò)誤,要怎么處理那?

回答
編輯回答
悶騷型
await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']});

puppeteer-issues-290

2017年9月11日 05:36