3

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,
}
2

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.