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

create-astro gets stuck installing deps under certain conditions (yarn, network throttle) #6166

Closed
1 task
mrienstra opened this issue Feb 7, 2023 · 3 comments · Fixed by #6266
Closed
1 task
Assignees
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)

Comments

@mrienstra
Copy link
Contributor

What version of astro are you using?

@next--refactor (merged into main, but not in a release yet)

Are you using an SSR adapter? If so, which one?

n/a

What package manager are you using?

yarn

What operating system are you using?

macOS 12.6.3 (latest release of Monterey), M1 hardware

Describe the Bug

While triaging #6165, I ran across an odd bug, which may or may not occur in the wild.

I've only seen it while using "Network Link Conditioner", from https://developer.apple.com/download/all/ -- I have Xcode 13.2, so I downloaded "Additional Tools for Xcode 13.2", then installed "Network Link Conditioner.prefPane", found inside the "Hardware" folder. I'm guessing this would also occur when network conditions deteriorate "naturally", but I haven't verified this.

  1. yarn create astro@next--refactor
  2. When you're at the "Install dependencies?" prompt, toggle on "Network Link Conditioner" "Very Bad Network"
  3. Return to your terminal & select "Yes" (to install deps)
  4. You can now toggle off "Network Link Conditioner", and you should be stuck on "Dependencies installing with yarn..." indefinitely

Looking at what is being written into .yarn/cache, it appears to be complete.

I had to use ps | grep astro & kill <pid> to stop it.

Latest node v16 release, v16.19.0: yarn 3.4.1.
Latest node v18 release, v18.14.0: yarn 3.4.1.
Latest node v19 release, v19.6.0: yarn 3.4.1.

After the next create-astro release occurs, it should be possible to reproduce by running yarn create astro, since #6082 has been merged into main.

Link to Minimal Reproducible Example

n/a

Participation

  • I am willing to submit a pull request for this issue.
@natemoo-re natemoo-re self-assigned this Feb 7, 2023
@natemoo-re
Copy link
Member

Hmm this is an interesting one! We're just waiting for execa(yarn, ['install']) to resolve, but under these conditions maybe it never does?

Curious if a reasonable timeout would be the right move here.

@matthewp matthewp added the - P3: minor bug An edge case that only affects very specific usage (priority) label Feb 8, 2023
@natemoo-re natemoo-re removed their assignment Feb 9, 2023
@mrienstra
Copy link
Contributor Author

Awesome @natemoo-re! Funny, I was just looking at this today, I was playing with calling execa locally, thought I might end up filing something upsteam (on execa) later.

I wonder if 1 minute might be aggressive for people with really marginal internet, maybe it should be longer, or overridable? Though I suppose they can just install deps manually in that scenario, not exactly a show-stopper. 🤔

@natemoo-re
Copy link
Member

Yeah I think 60s might be a bit on the fast side in those situations. Open to a PR that bumps this up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants