Describe the bug
Currently, when starting two React apps with e.g. HOST=127.0.0.1 PORT=3000 and HOST=127.2.2.2 PORT=3000, the second app will fail with an error Something is already running on port 3000, although starting two apps on same port but different addresses is valid. Note that this works when not using address 127.0.0.1.
Did you try recovering your dependencies?
N/A
Environment
N/A
Steps to reproduce
- Create a React app
- Run
HOST=127.0.0.1 PORT=3000 npm run start in a first terminal
- Run
HOST=127.2.2.2 PORT=3000 npm run start in a second terminal
Expected behavior
Both apps are running on their respective address.
Actual behavior
Only the first app (on 127.0.0.1:3000) is running, the second app didn't start with an error: Something is already running on port 3000.
When patching the code manually to bypass this check, both apps can run aside without issues.
Reproducible demo
Any React app is applicable.
Trivia
The issue is coming from the package detect-port-alt from @Timer, a fork of detect-port which adds host support, but doesn't cover this edge case. Unfortunately, this fork doesn't allow creating GitHub issues and changes have not been upstreamed.
Describe the bug
Currently, when starting two React apps with e.g.
HOST=127.0.0.1 PORT=3000andHOST=127.2.2.2 PORT=3000, the second app will fail with an errorSomething is already running on port 3000, although starting two apps on same port but different addresses is valid. Note that this works when not using address127.0.0.1.Did you try recovering your dependencies?
N/A
Environment
N/A
Steps to reproduce
HOST=127.0.0.1 PORT=3000 npm run startin a first terminalHOST=127.2.2.2 PORT=3000 npm run startin a second terminalExpected behavior
Both apps are running on their respective address.
Actual behavior
Only the first app (on
127.0.0.1:3000) is running, the second app didn't start with an error:Something is already running on port 3000.When patching the code manually to bypass this check, both apps can run aside without issues.
Reproducible demo
Any React app is applicable.
Trivia
The issue is coming from the package detect-port-alt from @Timer, a fork of detect-port which adds
hostsupport, but doesn't cover this edge case. Unfortunately, this fork doesn't allow creating GitHub issues and changes have not been upstreamed.