Open ppqn opened 5 years ago
@ppqn @DeMoorJasper is there anything against me making a pull request to fix this?
While this message is inconsequential, it looks like my library is broken.
This is occuring on my Windows 10 Pro too.
I need it to run on port 1234
, but not matter what, I can't get it to. Even though port 1234
is not in use.
@JwanKhalaf This is only an aesthetic bug, the port was opened successfully, but the bug output "configured port .... could not be used" regardless. I don't think your problem is the same; your problem is the port cannot be opened so it opened a random port.
@ppqn I suspect you're right. Thank you.
@BrockAtkinson should I create a new issue for my version of the problem? There isn't much online about this problem.
This was the fix for me: https://stackoverflow.com/a/58457861/613605
@ppqn This was annoying me so I've submitted a pull request :)
🐛 bug report
When setting the port using the environment variable PORT; parcel incorrectly reports that the port could not be used.
🎛 Configuration (.babelrc, package.json, cli command)
Command line:
🤔 Expected Behavior
Expects parcel to report:
😯 Current Behavior
Parcel reports:
💁 Possible Solution
In src/Server.js
server.address().port
is a numberport
could be a string or a number; when specifying an environment PORT on Windows, it seems thatport
is a stringAdding a
Number.parseInt
to the port seems to fix the problem:🌍 Your Environment