sindresorhus / pageres

Capture website screenshots
MIT License
9.68k stars 744 forks source link

Puppeteer old Headless deprecation warning #441

Open badfeather opened 10 months ago

badfeather commented 10 months ago

I'm receiving the following message when running Pageres:


    In the near future `headless: true` will default to the new Headless mode
    for Chrome instead of the old Headless implementation. For more
    information, please see https://developer.chrome.com/articles/new-headless/.
    Consider opting in early by passing `headless: "new"` to `puppeteer.launch()`
    If you encounter any bugs, please report them to https://github.com/puppeteer/puppeteer/issues/new/choose.

(node:22972) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.```
RobLoach commented 9 months ago

A workaround for now can be passing launchOptions headless: 'new'....

await new pageres({
  launchOptions: {
      headless: 'new'
  }
})