I'm trying to switch from localhost to a specific IP address, but I keep getting this error:
listen EADDRNOTAVAIL 192.168.1.139:8000
webpack.config.js
devServer: {
host: '192.168.1.139',
port: '8000',
compress: true,
}
The error you encountered:
listen EADDRNOTAVAIL 192.168.1.139:8000
Throws due to binding to already used port, it means 8000 is currently being managed eg. from another application (You must change a port or you must kill a process).
For your case of making local IP address binded as host it is possible for example via npm/yarn start:
"start": "webpack-dev-server --inline --port 8080 --host 192.168.1.139 --content-base ."
Assuming your machine's local IP is 192.168.1.139.
Based on Snippet from issue #147 webpack-dev-server.
As you are trying to map to a differrent ip : You need an entry in your hosts file as well to point that to localhost. add the below in to your hosts file
127.0.0.1 192.168.1.139
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With