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

Yarn add hangs building fresh packages for Puppeteer #6663

Closed
Srutherford2407 opened this issue Nov 11, 2018 · 14 comments
Closed

Yarn add hangs building fresh packages for Puppeteer #6663

Srutherford2407 opened this issue Nov 11, 2018 · 14 comments

Comments

@Srutherford2407
Copy link

Yarn Version 11.12.3

Bug with package install. Running yarn add puppeteer and it hangs on fresh package install never finishing. This is the only package I am having an issue currently.

Run yarn add puppeteer

What is the expected behavior?
Package should install, I need this package for QA UI automation on a project
yarn error

Please mention your node.js, yarn and operating system version.
Node version 10.13.0 running on a Mac

@ghost ghost added the triaged label Nov 11, 2018
@rally25rs
Copy link
Contributor

rally25rs commented Nov 13, 2018

I installed the same package on OSX Sierra, Node 10.13.0, Yarn 1.12.3 and it worked for me.
It was slow though... it took ~25 seconds on a Macbook Pro i7.

That step is running puppeteer's custom install script, so it might not be completely up to yarn.


I think you could check the output by running this script manually by running:

yarn add puppeteer --ignore-scripts
cd node_modules/puppeteer
yarn exec node install.js

It looks like it actually downloads Chromium, so if that download hangs for some reason, then it could hang all of the yarn install.

~/Projects/yarn-test2 🐒   yarn add puppeteer --ignore-scripts
yarn add v1.12.3
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
warning Ignored scripts due to flag.
success Saved lockfile.
✨  Done in 1.23s.

~/Projects/yarn-test2 🐒   cd node_modules/puppeteer/

~/Projects/yarn-test2/node_modules/puppeteer 🐒   yarn exec node install.js
yarn exec v1.12.3
Downloading Chromium r599821 - 82.9 Mb [====================] 99% 0.0s
Chromium downloaded to /Users/jvalore/Projects/yarn-test2/node_modules/puppeteer/.local-chromium/mac-599821
✨  Done in 21.70s.

@gitowiec
Copy link

gitowiec commented Jan 7, 2019

It is so slow today, every time I run yarn install or yarn add some-package in my monorepo I have to wait about 5 minutes...

@aadityataparia
Copy link

Would be nice to show this progress during yarn add or yarn install

Downloading Chromium r599821 - 82.9 Mb [====================] 99% 0.0s
Chromium downloaded to /Users/jvalore/Projects/yarn-test2/node_modules/puppeteer/.local-chromium/mac-599821
✨  Done in 21.70s.

@lili21
Copy link

lili21 commented Mar 29, 2019

What Building fresh packages doing ? Can I get the info about time spending like --har options ? It takes really long time in my project, like hundreds seconds .

@osdiab
Copy link

osdiab commented Jun 12, 2019

Besides making there be a clearer indicator of the download, it would also be nice if it better cached the download - i noticed when I was on a slow internet connection earlier today that every time I ran yarn install without updating the puppeteer version, it still took forever to run that build script; if it's really just downloading Chromium then I'd expect that that download would be cached. But maybe that's an issue for the puppeteer repo.

@AzySir
Copy link

AzySir commented Jun 20, 2019

I've encountered this issue - installed Chromium manually (outside of the terminal). Then I've run it again and it's now stuck at this -

Screen Shot 2019-06-20 at 12 36 52 pm

@piofinn
Copy link

piofinn commented Jun 27, 2019

installed Chromium manually (outside of the terminal)

This doesn't matter. puppeteer will always download chromium on it's own, since it cannot know where to look for a locally installed version 🤷‍♂️

@binarykitchen
Copy link
Contributor

$ yarn exec node node_modules/puppeteer/install.js
yarn exec v1.19.1
Downloading Chromium r686378 - 110.2 Mb [====================] 99%

Always hangs at 99% here

@videni
Copy link

videni commented Feb 1, 2020

I have to wait for this long, any workaroud please?
Downloading Chromium r686378 - 110.2 Mb [== ] 8% 11215.9s

@binarykitchen
Copy link
Contributor

After a heavy debugging session turns out the end event never gets called. The end event of the response from the HTTPS request to download that zip file.

When I check on the file system, the zip file is there and can be uncompressed manually. Just the pipe hangs when running the installation.

@muescha
Copy link

muescha commented Apr 20, 2020

if i install prject dependencies it via yarn install it stuck also at puppeteer

and i see no processbar
who i can enable it to see at least the processbar with a yarn install (i not use yarn add ...)

@rally25rs
Copy link
Contributor

rally25rs commented Apr 20, 2020

The "Downloading Chromium" step is part of Puppeteer's custom install script. This is not under yarn's control. Yarn just spawns their install script as a child process, then waits for that process to exit.

Please track this issue on Puppeteer's issues page.
https://github.com/puppeteer/puppeteer/issues

From just a quick search of their issues:

@muescha
Copy link

muescha commented Apr 22, 2020

if puppeteer would log something, then it would be visible via yarn install?

the problem here i is that there is no progressbar visible

@superelement
Copy link

Was having same problem, but clearing yarn cache worked for me.
yarn cache clean && yarn install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests