Closed tagoad closed 10 months ago
try this in next.config.js
experimental: {
serverComponentsExternalPackages: [
"puppeteer-extra",
"puppeteer-extra-plugin-stealth",
"puppeteer-extra-plugin-recaptcha",
],
},
try this in
next.config.js
experimental: { serverComponentsExternalPackages: [ "puppeteer-extra", "puppeteer-extra-plugin-stealth", "puppeteer-extra-plugin-recaptcha", ], },
That worked. I can't believe it was that straight forward but I haven't seen that solution mentioned anywhere else online. Thank you so much!
Describe the bug We are making a new project using Next JS 13 and are having issues with using the StealthPlugin. We can use Puppeteer Extra just fine, but when we import the StealthPlugin we get the following error at runtime:
It appears to be an issue with a dependency, but hopefully there is some work around or fix as we can not scrape some of the sites we use to without this plugin.
Code Snippet
It literally just happens by importing, no specific code.
Versions
System: OS: Windows 10 10.0.19045 CPU: (8) x64 AMD Ryzen 7 4700U with Radeon Graphics Memory: 5.26 GB / 39.42 GB Binaries: Node: 16.17.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.15.0 - C:\Program Files\nodejs\npm.CMD npmPackages: puppeteer: ^20.4.0 => 20.5.0 puppeteer-core: ^21.0.3 => 21.0.3 puppeteer-extra: ^3.3.6 => 3.3.6 puppeteer-extra-plugin-stealth: ^2.11.2 => 2.11.2