Handling the situation when the standard port is busy

Feature report

webpack:

> webpack-dev-server --port=4200
 10%% building modules 2/2 modules 0 active(node:8626) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
events.js:183
      throw er; // Unhandled 'error' event
      ^
Error: listen EADDRINUSE 127.0.0.1:4200
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at Server.setupListenHandle [as _listen2] (net.js:1351:14)
    at listenInCluster (net.js:1392:12)
    at GetAddrInfoReqWrap.doListen [as callback] (net.js:1501:7)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:97:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frontend@0.0.1 start: `webpack-dev-server --port=4200`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the frontend@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-05-15T16_33_52_169Z-debug.log

ng:
Port 4200 is already in use. Use '--port' to specify a different port.

What is the current behavior?
Kilometer hieroglyphs 🙂 Beginners in the webpack will be shocked.

If the current behavior is a bug, please provide the steps to reproduce.
This is not an error. This is a feature.

What is the expected behavior?
It would be fun if the hieroglyphs were written to the log and on the screen appeared more short inscription.
All this you can try here: https://github.com/isopen/soc/tree/master/frontend

Other relevant information:
webpack version: 4.8.3
Node.js version: 8.9.4
Operating System: debian 9.3

Author: Fantashit

1 thought on “Handling the situation when the standard port is busy

Comments are closed.