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

Prompt to choose different port if :8000 is already in use #25016

Closed
wants to merge 2 commits into from

Conversation

mxstbr
Copy link
Contributor

@mxstbr mxstbr commented Jun 16, 2020

Should resolve #24854 by moving the "detect if port is in use and prompt to choose different one" logic to the parent process.

As the develop process now runs on a random unused port anyway, this code path is irrelevant for it. However, the proxy now listens at :8000 (or the user-selected port) so we need it to detect and prompt instead.

@mxstbr mxstbr requested a review from a team as a code owner June 16, 2020 09:08
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jun 16, 2020
Copy link
Contributor

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. I'll update my branch 😂

@ascorbic ascorbic added topic: cli Related to the Gatsby CLI and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jun 16, 2020
@mxstbr mxstbr added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Jun 16, 2020
@pvdz
Copy link
Contributor

pvdz commented Jun 16, 2020

It seems at least one test is broken now.

From the e2e_tests_development_runtime output:

Something is already running at port 8000
? Would you like to run the app at another port instead? › (Y/n)��Error: Timeout

@ascorbic ascorbic removed the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Jun 19, 2020
@marcysutton
Copy link
Contributor

People are still running into this (including me!), and looks like it got stalled. Can it be revisited? looks like there's a merge conflict.

@mxstbr
Copy link
Contributor Author

mxstbr commented Jul 21, 2020

This was fixed in #25863 by the amazing @polarathene!

Sorry for letting this set for so long, completely my bad, this drowned in my brain 😬 Closing.

@mxstbr mxstbr closed this Jul 21, 2020
@mxstbr mxstbr deleted the prompt-to-choose-port branch July 21, 2020 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: cli Related to the Gatsby CLI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

develop command crashing when default 8000 port in use,
4 participants