On Windows, "Port "1212"" incorrectly reported as in use.
See original GitHub issuePrerequisites
- Using yarn
- Using node 10.x
- Using an up-to-date
master
branch - Using latest version of devtools. See wiki for howto update
- Link to stacktrace in a Gist (for bugs) https://gist.github.com/maurocolella/f2d2255096902f437e9bfbd1e8558022
- For issue in production release, devtools output of
DEBUG_PROD=true yarn build && yarn start
- Tried solutions mentioned in #400
Expected Behavior
The app run in dev when running yarn dev
.
Current Behavior
On Windows 10 Pro (latest), the app fails at CheckPortInUse.js
regardless of ports used (80
, 3000
, 8080
or the default, 1212
).
Possible Solution
Fix, or escalate request for fix for port test in detect-port
dependency.
Steps to Reproduce (for bugs)
-
Setup node 10.x and yarn in a Windows 10 environment.
-
Ensure Windows Firewall is turned on with default config. Should automatically prompt for network access for each application/environment separately.
-
Clone the repo.
git clone --depth 1 --single-branch --branch master https://github.com/electron-react-boilerplate/electron-react-boilerplate.git your-project-name
-
Install the dependencies.
$ cd your-project-name
$ yarn
yarn dev
Context
Eventually, I created a separate npm script to run the application.
$ cross-env START_HOT=1 yarn start-renderer-dev
$ cross-env NODE_ENV=development webpack-dev-server --config configs/webpack.config.renderer.dev.babel.js
This works.
I suppose that for some security-related reason, the Windows Firewall either does not respond to the probe in detect-port
or denies, when the port is actually not in use and free.
Your Environment
- Node version :
v10.14.2
vianvm for Windows.
npm v6.4.1
- Version or Branch used : master. Latest at time of writing.
- Operating System and version :
Windows 10 Pro 1903 / OS Build 18362.295
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:5
I have manage to fix the same issue in Windows 11 running the following commands on CMD as Admin
net stop winnat net start winnat
Thank you very much