Puppeteer error Error: Failed to launch Chrome!

use puppeteer to generate pdf files. When moving, prompt: / 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

error, how to deal with that?

Apr.16,2021

await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']});

puppeteer-issues-290


https://blog.csdn.net/w201013. refer to this and try

Menu