webpack-dev-server: No data received ERR_EMPTY_RESPONSE
I followed http://webpack.github.io/docs/tutorials/getting-started/ exactly, and the last step
webpack-dev-server --progress --colors results in this error

I’ve tried
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 6
- Comments: 27 (2 by maintainers)
Links to this issue
Commits related to this issue
- :memo: Doc: Set dev server to 127.0.0.1 When walking through the setup documentationn I was unable to access the dev server on localhost:8080 on Mac OSX. I attempted to implement the workarounds sugg... — committed to gcallaghan/netlify-cms by gcallaghan 7 years ago
- :memo: Doc: Set dev server to 127.0.0.1 When walking through the setup documentationn I was unable to access the dev server on localhost:8080 on Mac OSX. I attempted to implement the workarounds sugg... — committed to gcallaghan/netlify-cms by gcallaghan 7 years ago
- :memo: Doc: Set dev server to 127.0.0.1 **- Summary** When walking through the setup documentationn I was unable to access the dev server on localhost:8080 on Mac OSX. I attempted to implement the w... — committed to gcallaghan/netlify-cms by gcallaghan 7 years ago
- :memo: Doc: Set dev server to 127.0.0.1 **- Summary** When walking through the setup documentationn I was unable to access the dev server on localhost:8080 on Mac OSX. I attempted to implement the w... — committed to gcallaghan/netlify-cms by gcallaghan 7 years ago
- :memo: Doc: Set dev server to 127.0.0.1 **- Summary** When walking through the setup documentationn I was unable to access the dev server on localhost:8080 on Mac OSX. I attempted to implement the w... — committed to gcallaghan/netlify-cms by gcallaghan 7 years ago
This might help some of you. I was experiencing the same issue running a vagrant VM with port forwarding on port 3000. I could curl http://localhost:3000 from within the VM but content wasn’t getting forwarded. By default, webpack-dev-server binds to localhost (127.0.0.1) which is a loopback address. Therefore you need to add --host 0.0.0.0 to your webpack-dev-server command. Mine:
No other changes were necessary.
@fredantell provides a similar solution above.
To follow up, I’m not sure that we really solved the problem, but we did work around it. On the machine that was having issues, accessing the server from http://127.0.0.1:8080/ worked where http://localhost:8080/ failed. This is despite the /etc/hosts file appearing to be correct, and despite the fact that a python SimpleHTTPServer was accessible via http://localhost:8080/ with no issues.
In addition to that workaround, we also dropped our repo into a docker container. In order to make that function properly we added a “-host 0.0.0.0” flag to the command to launch the server. In the end it became: “webpack-dev-server --hot --host 0.0.0.0 --progress --colors” and our webpack.config.js had this entry: entry: { app: [ “webpack-dev-server/client?:8080/”, //fix issues with socket.io and live reloading ‘webpack/hot/dev-server’, … ] }
or shadow sock something
guess you should check if there’s some proxy extension on your chrome XD
I had this problem; turns out I had an errant Docker container running in the background from another project listening on the same port (no http errors shown in webpack-dev-server though - watch out!). Stopped the containers, then everything worked @ localhost:8080
I was able to delete ‘::1 localhost’ in /etc/hosts and it works now
problem: localhost:8080 failed but 127.0.0.1:8080 worked i resolved this problem by delete the line ‘::1 localhost’ in the /etc/hosts
I was able to solve this issue by doing this as well:
I had to use 127.0.0.1
Try using 127.0.0.1 or another alias from /etc/hosts. You’ll need to use a matching --host parameter when you start webpack-dev-server and may need to update output.publicPath in your config as well.
Here’s how I did it.
in /etc/hosts:
127.0.0.1 cheetahin webpack.config.js:
output.publicPath = 'http://cheetah:8080/';command line:
webpack-dev-server --host cheetah** PS ** this was simplified from my actual configuration.
Maybe you could try it that turn “Global Mode” to “Auto Proxy Mode” in ShadowsocksX.