Open stoplion opened 8 years ago
Having the same issue with browser-sync@2.14
.
Can confirm it works as expected in browser-sync@2.13
so the new version must have introduced some regression (tested on Node v6.3.1 and v5.11.1).
Ok, so I'm confused now. It indeed didn't work, but since I've removed whole node_modules
and install v2.14.0 again, it works...
Tried to look for some of the dependencies that could get updated in the meantime I started the project, but haven't found any, most of them are locked down.
Just a shot, but maybe it has something to do with how NPM resolves dupes and how it depends on the order of installation.
Anyway, @stoplion, can you check if the same works for you?
Same error here, tried versions 2.16, 2.14, 2.13, 2.11 and they all get stuck with a proxy configuration.
Running browser-sync with node_modules/.bin/browser-sync start --port 8000 --proxy localhost:8001
and yes, proxy on port 8001 is running and answering requests.
Removing node_modules and npm cache doesn't help.
For mine, I have to clean (i.e. delete the destination files) whenever the proxy starts to hang. I am not sure why deleting files makes a difference.
I have a simialr problem with the latest version of Browsersync and I noticed that it works when the host of the target is different 🤔
Before (not working):
browserSync.init({
proxy: 'localhost:8000'
})
After (seems to work):
browserSync.init({
proxy: {
target: '127.0.0.1:8000',
proxyReq: [
function(proxyReq, req) {
// Assign proxy "host" header same as current request at Browsersync server
proxyReq.setHeader('Host', req.headers.host)
}
]
},
})
Issue details
Proxy never connects..
Starting a simple rack based web server running on port 9292, then try to proxy it
$ gulp browser-sync
pops open a new window but it just hangs..Browsersync 2.14.0 Node v6.3.1 OS X 10.11.5
http://stackoverflow.com/questions/38755795/browser-sync-proxy-fails-to-connect