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.
Yes
npx @docusaurus/init@next init docusaurus-repro classiccd docusaurus-repronpm run buildnpm run serve -- --port 3000 (or any port)npm run serve -- --port 3000 should boot the app on port 3000.
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.

https://github.com/arinthros/docusaurus-repro
See To Reproduce
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. :)