Chrome can't open localhost:3000 with Gulp/BrowserSync


Michael Giovanni Pummer

For some reason, no matter what I try, Google Chrome doesn't seem to be able to display http://localhost:3000 (or any other port number specified) when the server is started using BrowserSync via Gulp .

Navigating to the same URI in Firefox shows that it works and BrowserSync is connected .

gulp.task('browser-sync', function() {
    browserSync.init({
        server: {
            baseDir: './'
        },
        port: 8080
    });
});

I specified 8080the above port as an alternative , but even using the default port 3000doesn't work in Chrome. Firefox seems to work with either.

I went to: chrome://net-internals/#dns and cleared host cache, rebooted etc. Nothing works.

In Chrome I only get the following message:ERR_CONNECTION_REFUSED

Any ideas? thanks.

PS - also works in Safari.

Michael Giovanni Pummer

I figured out the problem, if this helps anyone.

The site is accessed via the public IP provided by BrowserSync, but I still need it localhost:3000, so I looked further into the hosts file on the Mac.

This line appears to be the one that affects the join by default:

::1    localhost

All you need to do is comment out this line and you should be fine:

#::1    localhost

Hope this helps someone with similar issues using Gulp and BrowserSync with Chrome on Mac.

Related


Chrome can't open localhost:3000 with Gulp/BrowserSync

Michael Giovanni Pummer For some reason, no matter what I try, Google Chrome doesn't seem to be able to display http://localhost:3000 (or any other port number specified) when the server is started using BrowserSync via Gulp . Navigating to the same URI in Fir

Chrome can't open localhost:3000 with Gulp/BrowserSync

Michael Giovanni Pummer For some reason, no matter what I try, Google Chrome doesn't seem to be able to display http://localhost:3000 (or any other port number specified) when the server is started using BrowserSync via Gulp . Navigating to the same URI in Fir

Chrome can't open localhost

Corey Brigade I have a web server running in my computer and both Firefox and Internet Explorer will open http://localhost:8080/login.html No problem, but Chrome shows: This webpage is not available Why is this so? Everything else in Chrome is fine, I'm actu

Chrome can't open localhost

Corey Brigade I have a web server running in my computer and both Firefox and Internet Explorer will open http://localhost:8080/login.html No problem, but Chrome shows: This webpage is not available Why is this so? Everything else in Chrome is fine, I'm actu

Can't open new tab in react, add localhost:3000 on link?

gpbaculio I've used this link from React Router Doms: <Link target="_blank" to={"www.mylink.com"} >mylink </Link> But this will also use href: open new tab to http://localhost:3000/www.mylink.com . <a href={'www.mylink.com'} target="_blank" > mylink </a> Sam

Can't open new tab in react, add localhost:3000 on link?

gpbaculio I've used this link from React Router Doms: <Link target="_blank" to={"www.mylink.com"} >mylink </Link> But this will also use href: open new tab to http://localhost:3000/www.mylink.com . <a href={'www.mylink.com'} target="_blank" > mylink </a> Sam

Can't open new tab in react, add localhost:3000 on link?

gpbaculio I've used this link from React Router Doms: <Link target="_blank" to={"www.mylink.com"} >mylink </Link> But this will also use href: open new tab to http://localhost:3000/www.mylink.com . <a href={'www.mylink.com'} target="_blank" > mylink </a> Sam

Can't open new tab in react, add localhost:3000 on link?

gpbaculio I've used this link from React Router Doms: <Link target="_blank" to={"www.mylink.com"} >mylink </Link> But this will also use href: open new tab to http://localhost:3000/www.mylink.com . <a href={'www.mylink.com'} target="_blank" > mylink </a> Sam

Can't open new tab in react, add localhost:3000 on link?

gpbaculio I've used this link from React Router Doms: <Link target="_blank" to={"www.mylink.com"} >mylink </Link> But this will also use href: open new tab to http://localhost:3000/www.mylink.com . <a href={'www.mylink.com'} target="_blank" > mylink </a> Sam

Can't open new tab in react, add localhost:3000 on link?

gpbaculio I've used this link from React Router Doms: <Link target="_blank" to={"www.mylink.com"} >mylink </Link> But this will also use href: open new tab to http://localhost:3000/www.mylink.com . <a href={'www.mylink.com'} target="_blank" > mylink </a> Sam

Can't get / on localhost:3000

chest of drawers When I Cannot GET /execute Gulp it only shows that the browser has this problem . chest of drawers As it turns out, the gum seems to be a bit flaky and needs some nurture to start working. Purely to help it work properly. It may have been kill

Can't get / on localhost:3000

chest of drawers When I Cannot GET /execute Gulp it only shows that the browser has this problem . chest of drawers As it turns out, the gum seems to be a bit flaky and needs some nurture to start working. Purely to help it work properly. It may have been kill

Can't get / on localhost:3000

chest of drawers When I Cannot GET /execute Gulp it only shows that the browser has this problem . chest of drawers As it turns out, the gum seems to be a bit flaky and needs some nurture to start working. Purely to help it work properly. It may have been kill

Can't get / on localhost:3000

chest of drawers When I Cannot GET /execute Gulp it only shows that the browser has this problem . chest of drawers As it turns out, the gum seems to be a bit flaky and needs some nurture to start working. Purely to help it work properly. It may have been kill

Can't get / on localhost:3000

chest of drawers When I Cannot GET /execute Gulp it only shows that the browser has this problem . chest of drawers As it turns out, the gum seems to be a bit flaky and needs some nurture to start working. Purely to help it work properly. It may have been kill

Can't get / on localhost:3000

chest of drawers When I Cannot GET /execute Gulp it only shows that the browser has this problem . chest of drawers As it turns out, the gum seems to be a bit flaky and needs some nurture to start working. Purely to help it work properly. It may have been kill

Can't get / on localhost:3000

chest of drawers When I Cannot GET /execute Gulp it only shows that the browser has this problem . chest of drawers As it turns out, the gum seems to be a bit flaky and needs some nurture to start working. Purely to help it work properly. It may have been kill

Can't get / on localhost:3000

chest of drawers When I Cannot GET /execute Gulp it only shows that the browser has this problem . chest of drawers As it turns out, the gum seems to be a bit flaky and needs some nurture to start working. Purely to help it work properly. It may have been kill

Can't get / on localhost:3000

chest of drawers When I Cannot GET /execute Gulp it only shows that the browser has this problem . chest of drawers As it turns out, the gum seems to be a bit flaky and needs some nurture to start working. Purely to help it work properly. It may have been kill

Can't get / on localhost:3000

chest of drawers When I Cannot GET /execute Gulp it only shows that the browser has this problem . chest of drawers As it turns out, the gum seems to be a bit flaky and needs some nurture to start working. Purely to help it work properly. It may have been kill

Can't get / on localhost:3000

chest of drawers When I Cannot GET /execute Gulp it only shows that the browser has this problem . chest of drawers As it turns out, the gum seems to be a bit flaky and needs some nurture to start working. Purely to help it work properly. It may have been kill

Can't run localhost:3000: Rendering blank page

LD I am using Rails 4.2.6, Ruby 2.3.0 and Puma 3.3.0. Over the past few days I've run some package updates and after Rails' URL localhost:3000 all browsers render the same blank page. This is consistent with all 6-7 apps I'm using. However, when deploying to H

Can't run localhost:3000: Rendering blank page

LD I am using Rails 4.2.6, Ruby 2.3.0 and Puma 3.3.0. Over the past few days I've run some package updates and after Rails' URL localhost:3000 all browsers render the same blank page. This is consistent with all 6-7 apps I'm using. However, when deploying to H

Can't run localhost:3000: Rendering blank page

LD I am using Rails 4.2.6, Ruby 2.3.0 and Puma 3.3.0. Over the past few days I've run some package updates and after Rails' URL localhost:3000 all browsers render the same blank page. This is consistent with all 6-7 apps I'm using. However, when deploying to H