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.
etc/hostsmapping? How to Setup Local DNS Using /etc/hosts File in Linux