Reveal.js: Live reload not working

Created on 4 May 2017  Â·  7Comments  Â·  Source: hakimel/reveal.js

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.

question

Most helpful comment

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

All 7 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Enosinger picture Enosinger  Â·  4Comments

nielsnuebel picture nielsnuebel  Â·  3Comments

MurhafSousli picture MurhafSousli  Â·  5Comments

karlroberts picture karlroberts  Â·  4Comments

berteh picture berteh  Â·  5Comments