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

Docusaurus doesn't respect the $PORT environment variable #8681

Closed
6 of 7 tasks
seyoon20087 opened this issue Feb 18, 2023 · 2 comments · Fixed by #9610
Closed
6 of 7 tasks

Docusaurus doesn't respect the $PORT environment variable #8681

seyoon20087 opened this issue Feb 18, 2023 · 2 comments · Fixed by #9610
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.

Comments

@seyoon20087
Copy link
Contributor

seyoon20087 commented Feb 18, 2023

**NOTE: If you believe this is a question please convert it to a discussion (rather than closing it), cf https://bit.ly/3YWp3GJ

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

Docusaurus is not respecting the $PORT environment variable.

For example if I specify env PORT=8000 yarn start it will start on port 3000 and not on 8000.

Reproducible demo

https://github.com/seyoon20087/docusaurus-reproduction-port-env-not-respecting

Steps to reproduce

  1. Clone that repository
  2. Install dependencies (yarn)
  3. Attempt to start the server at port 8000, using env PORT=8000 yarn start
  4. The server will start at port 3000 and not 8000

Expected behavior

I expected that the server should start in the port on the $PORT environment variable specified

Actual behavior

The server will start on 3000 if I don't use --port option.
This is different from other frameworks (like Next.js), which they respect the $PORT environment variable.

For your reference here is the screenshot:
image

Your environment

Self-service

  • I'd be willing to fix this bug myself.
@seyoon20087 seyoon20087 added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Feb 18, 2023
@Josh-Cena Josh-Cena added feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. and removed bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Feb 18, 2023
@Pranav2612000
Copy link
Contributor

@Josh-Cena are you interested in fixing this? I'll like to work on this

@pinakipb2
Copy link
Contributor

pinakipb2 commented Aug 15, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants