Docusaurus: Try new Live Reload ports if default is taken

Created on 7 Jun 2018  路  10Comments  路  Source: facebook/docusaurus

Is this a bug report?

Not really. Sort of.

Have you read the Contributing Guidelines on issues?

Yes

Environment

N/A

Steps to Reproduce

  1. Run yarn start on a site
  2. Run yarn start on another site

Expected Behavior

Both sites run.

Actual Behavior

The server port will get to 3001. But the Live Reload port errors out as duplicate.

Reproducible Demo

See steps to reproduce above

starter good first issue

Most helpful comment

hi @JoelMarcey , can I take this up 馃槃
Looks like perfect place to start 馃憤

All 10 comments

Just gonna put the relevant codes/ tips to guide those who want to take this issue:

For now, the live reload had a fixed port as constant
https://github.com/facebook/Docusaurus/blob/49c27b733bf62506acff3c55f92143dc0ef3ed86/lib/server/server.js#L570-L575

Look at how we attempt to use different port when starting a server. Take inspiration from this & you'll solve this issue 馃槃
https://github.com/facebook/Docusaurus/blob/49c27b733bf62506acff3c55f92143dc0ef3ed86/lib/start-server.js#L52-L76

I'll be happy to help anyone who wanted to fix this issue

hi @JoelMarcey , can I take this up 馃槃
Looks like perfect place to start 馃憤

@vaibhavsingh97 It's yours

@vaibhavsingh97 It's yours!

I've added an "issue-claimed" label so that others will know not to start work on the issue. If you change your mind about the issue, no worries! Just let me know so that I can remove the label and free it up for someone else to claim.

I'll check in with you periodically so that we can keep the task updated with the progress.

yeah sure, Right now I am learning react as I am not familiar with it. I will try to fix after that.

If I'm not wrong, this portion of the code doesn't require React knowledge; more of Node.js 馃槃

@yangshun Oh! yes, I will soon send a PR 馃槃

@yangshun @endiliey I had sent the PR https://github.com/facebook/Docusaurus/pull/769 馃槃
can you help me in testing, I don't know how can I do it? I have read the https://docusaurus.io/docs/en/installation.html but it talks about how can I install using npm or yarn

Hi @vaibhavsingh97 -- https://github.com/facebook/Docusaurus/tree/master/admin should give you some docs on how to test your changes either with Docusaurus or another project.

Thanks @JoelMarcey successfuly tested and fixed the bug 馃槃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

azu picture azu  路  3Comments

ericnakagawa picture ericnakagawa  路  3Comments

lex111 picture lex111  路  3Comments

omry picture omry  路  3Comments

muuvmuuv picture muuvmuuv  路  3Comments