webpack-dev-server
webpack-dev-server copied to clipboard
Unable to catch error thrown by Server on port conflict
We have a wrapper on top of webpack-dev-server.
With webpack 4, when we started dev-server passing a port which was occupied we were getting EDDRINUSE logged in the console.
However, with webpack5 we do not see it getting logged & unable to catch the error thrown by the server in our wrapper code.
Any suggestion on how to handle it & catch the error emitted.
Thanks in advance
webpack-dev-server has static helper https://github.com/webpack/webpack-dev-server/blob/d1d14340d34ed5e5a97293cee09f49a85428c46f/lib/Server.js#L391, you can use it and assign to the port option
Closing due to inactivity. Thanks!