I have forked the repo, installed dependencies and I am running with npm start . Everything works fine except the live reload option. watch tasks works fine but browser is not being refreshed.
There's an error in console coming from livereload.js : Failed to load resource: net::ERR_ADDRESS_INVALID
I am on Windows 7 using chrome 57.
Ok, this exactly this issue: https://github.com/livereload/livereload-js/issues/50
I think you can close this.
if anyone is struggling with this the quick fix is to add hostname: 'localhost' to grunt-contrib-connect config in options in Gruntfile. This overwrites the default 0.0.0.0 host and works fine on Windows.
Interesting part:
connect: {
server: {
options: {
hostname: 'localhost',
port: port,
base: root,
livereload: true,
open: true
}
},
If this hostname is set, on MacOS is still working?
@allenGKC I cannot verify this but I'm pretty sure it would work.
@apieceofbart Thanks buddy, I have tried in MacOS,and it works well.
I had the same issue now, needed to add the hostname field, and comment useAvailablePort field.
Gruntfile.js connect before -
connect: {
server: {
options: {
port: port,
base: root,
livereload: true,
open: true,
useAvailablePort: true
}
}
},
Gruntfile.js connect after -
connect: {
server: {
options: {
hostname: 'localhost',
port: port,
base: root,
livereload: true,
open: true,
//useAvailablePort: true
}
}
},
To get to the heart of the issue, there is a really good chance that this is an issue with FireFox. Simply run the same project in a different browser or in incognito mode to see the difference. You can research and see what settings in your FireFox browser is causing the issue.
Most helpful comment
if anyone is struggling with this the quick fix is to add
hostname: 'localhost'togrunt-contrib-connectconfig in options in Gruntfile. This overwrites the default0.0.0.0host and works fine on Windows.Interesting part: