Code cannot continue execution after puppeteer,newPage

installation uses puppeteer
to find that it executes to const page = await browser.newPage (); the code for this step will not go to next week. After taking a look at it using headless: false, the browser does open it. The
console also reported no error.
I don"t know what happened

const puppeteer = require("puppeteer");
(async () => {
    const browser = await puppeteer.launch({
        headless: false
    });
    const page = await browser.newPage();
    // 
    await page.goto("https://www.douban.com/");
    await page.screenshot({
        path: "example.png"
    });
    await browser.close();
})();
Jul.17,2022
The

code is fine and can work properly. Take a look at the puppeteer version and delete it and reinstall it. Or check whether the local network can open' https://www.douban.com/'


  const browser = await puppeteer.launch({
      args: ['--single-process']
    });

configure this to solve

Menu