puppeteer错误 Error: Failed to launch chrome!

使用puppeteer来生成pdf文件,运动时,提示: /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

错误,要怎么处理那?


富国沪深
浏览 6688回答 1
1回答

呼如林

await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']});puppeteer-issues-290
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Node.js