Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Puppeteer downloading #672

Closed
b5414 opened this issue Jul 7, 2022 · 5 comments
Closed

[Bug] Puppeteer downloading #672

b5414 opened this issue Jul 7, 2022 · 5 comments
Labels
issue: bug report A bug has been reported needs triage

Comments

@b5414
Copy link

b5414 commented Jul 7, 2022

Describe the bug

The browser downloads each installation with such dependencies (attached below); even if I don't want to load puppeteer-extra...

It's ~500 mb, which are built in lambda every time, which adds some complexity

Code Snippet

> npm i
// with:
"dependencies": {
	"@sparticuz/chrome-aws-lambda": "^14.4.1",
	"playwright-core": "^1.24.0-alpha-jul-6-2022",
	"puppeteer-extra-plugin-stealth": "^2.10.2"
},

Versions

> npm list
+-- @sparticuz/chrome-aws-lambda@14.4.1
+-- playwright-core@1.24.0-alpha-jul-6-2022
+-- puppeteer-extra-plugin-stealth@2.10.2
@b5414 b5414 added issue: bug report A bug has been reported needs triage labels Jul 7, 2022
@berstend
Copy link
Owner

berstend commented Jul 7, 2022

I don't understand. You're downloading what and don't want what?

@berstend
Copy link
Owner

berstend commented Jul 7, 2022

ah, puppeteer-extra-plugin-stealth has puppeteer-extra-plugin as a dependency which lists puppeteer-extra as a peer dependency which lists puppeteer as a peer dependency.

Seems like peer dependencies are automatically installed, that behavior changed at some point if I recall correctly.

Will remove those peer dependencies or mark them as optional.

Quick fix:
set PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true

@berstend
Copy link
Owner

berstend commented Jul 7, 2022

Closing in favor of #527

@berstend
Copy link
Owner

berstend commented Jul 7, 2022

Fixed in [email protected]

@b5414
Copy link
Author

b5414 commented Jul 8, 2022

Very nice, thank you 😘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug report A bug has been reported needs triage
Projects
None yet
Development

No branches or pull requests

2 participants