一般情况下使用**puppeteer.executablePath()**即可。
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({
executablePath:puppeteer.executablePath(),
headless:false
});
const page = await browser.newPage();
await page.goto('https://baidu.com');
await page.screenshot({path: 'example.png'});
await browser.close();
})();