Closed karlhorky closed 1 year ago
Just adding that I'm also seeing this when trying to deploy puppeteer v20.4.0 to AWS Lambda, same line of reasoning as mentioned above.
The linked vm2
issue at least provides a workaround:
I have to copy these files to dist
But ya, since this is out of the control of these packages, I will close.
I saw the following warning: npm WARN deprecated vm2@3.9.19: The library contains critical security issues and should not be used for production! The maintenance of the project has been discontinued. Consider migrating your code to isolated-vm.
Will it be difficult to migrate? Perhaps migration will solve this issue too.
Partly related to the original issue in the old repo:
Copying my issue report from https://github.com/puppeteer/puppeteer/issues/10352, since
puppeteer-core
now depends onproxy-agent
and other packages in this repo:Bug expectation
I expected to be able to bundle my Puppeteer script with
esbuild
My
esbuild
-bundled Puppeteer script failed (see full error output below) because of the transitive dependency onvm2
(viapuppeteer-core
->proxy-agent
->pac-proxy-agent
->pac-resolver
->degenerator
->vm2
)It appears to be related to this current problem with bundling
vm2
:Seems like the first version that this happens with is
puppeteer-core@20.4.0
, which upgraded@puppeteer/browsers
from1.3.0
to1.4.0
, which addedproxy-agent
.Minimal, reproducible example
Bundle any Puppeteer script such as the simple script below via
esbuild
like this:index.ts
Error string
Puppeteer version
20.5.0
Node version
18.16.0
Package manager
pnpm
Package manager version
8.6.1
Operating system
macOS