berstend / puppeteer-extra

💯 Teach puppeteer new tricks through plugins.
https://extra.community
MIT License
6.42k stars 739 forks source link

[Bug] TypeError: Cannot read properties of undefined (reading '_launcher') #777

Open yarekc opened 1 year ago

yarekc commented 1 year ago

TypeError: Cannot read properties of undefined (reading '_launcher')

const puppeteer = require('puppeteer-extra');
const pluginStealth = require('puppeteer-extra-plugin-stealth');
const {executablePath} = require('puppeteer');

puppeteer.use(pluginStealth());

puppeteer.launch({ headless:false, executablePath: executablePath() }).then(async browser => {
    // Create a new page 
    const page = await browser.newPage();
});

and if I don't specify the executablePath, I got error:

Error: An executablePath or channel must be specified for puppeteer-core

Any idea ?