Docusaurus: Cli --port option reports "something is already running on port ${number}"

Created on 30 Sep 2020  路  4Comments  路  Source: facebook/docusaurus

馃悰 Bug Report

When running the command npm run serve -- --port 3000, the system reports Something is already running on port 3000. The same behavior is exhibited for any port, both in local and CI environments. When running just npm run serve it boots up on port 3000 with no issues.

I have tested and confirmed this issue exists on a vanilla Docusaurus 2 installation.

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

  1. npx @docusaurus/init@next init docusaurus-repro classic
  2. cd docusaurus-repro
  3. npm run build
  4. npm run serve -- --port 3000 (or any port)

Expected behavior

npm run serve -- --port 3000 should boot the app on port 3000.

Actual Behavior

npm run serve -- --port 3000 gives the notice Something is already running on port 3000. When selecting no to run on another port, the app boots into http://localhost:null.

Screen Shot 2020-09-30 at 11 00 03 AM

Your Environment

  • Docusaurus version used: 2.0.0-alpha.64
  • Environment name and version: Node LTS (12.18.4)
  • Operating system and version: MacOS 10.15.6
  • CI environment: node:lts docker image

Reproducible Demo

https://github.com/arinthros/docusaurus-repro
See To Reproduce

bug good first issue hacktoberfest help wanted

All 4 comments

thanks, looks like a good first issue for hacktoberfest :)

Hi, @slorber. First timer here. May I take this issue for hacktoberfest?

Hi @UmairKamran and welcome.

Yes please give it a try and also read comments on https://github.com/facebook/docusaurus/pull/3514 :)

Hey @slorber and @arinthros, I've opened the PR #3531 to fix this issue. Hope you get the chance to review it soon. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ericnakagawa picture ericnakagawa  路  3Comments

philipmjohnson picture philipmjohnson  路  3Comments

NikitaIT picture NikitaIT  路  3Comments

muuvmuuv picture muuvmuuv  路  3Comments

endiliey picture endiliey  路  3Comments