BrowserSync Cannot GET /

browsersync init
browsersync not working
browsersync proxy not working
browsersync alternative
browsersync connected
gulp cannot get
browsersync run
disable browsersync

I only have installed NodeJS and BrowserSync with this command:

npm install -g browser-sync 

After I use this command to start the server:

C:\xampp\htdocs\browser_sync
λ browser-sync start --server
[BS] Access URLs:
 --------------------------------------
       Local: http://localhost:3000
    External: http://192.168.1.223:3000
 --------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.1.223:3001
 --------------------------------------
[BS] Serving files from: ./

And I get the following error: Cannot GET /

I'm confused because I want to use BrowserSync with my Laravel project.

Where should I install BrowserSync?

Thanks.

gulp + browser-sync Cannot GET / error, Is there an index.html file in your ./public/ folder? If not, you need to tell browserSync what is your start page. You can also get browserSync to  When I rename bower.html to index.html I had no troubles, but why custom naming html file (in my case bower.html) get Cannot GET ) This comment has been minimized. Sign in to view

Because it works only with index.html by default, for example:

linux@linux-desktop:~/Templates/browsersync-project$ ls 

brow.html  css

linux@linux-desktop:~/Templates/browsersync-project$ browser-sync start --server --files '.'

Expected result:

Cannot GET/

In order to see your static web-page in the web-browser instead of that annoying message you have to rename a file brow.html to index.html. This will solve Cannot GET/ problem.

P.S. Where you are installing a browser-sync doesn’t matter. Just type npm install -g browser-sync whatever directory you are in, and after double check browser-sync --version.

A note on BrowserSync, Cannot Get / errors, Just wanted to post this in case anyone else ran into a similar issue. I was getting a "cannot get /" error when launching Browser-Sync in Google  Cannot GET/ In order to see your static web-page in the web-browser instead of that annoying message you have to rename a file brow.html to index.html. This will solve Cannot GET/ problem. P.S. Where you are installing a browser-sync doesn’t matter.

This article was extreamly helpful for getting browsersync to work with a PHP site.

These are what the configurations for both Grunt and Gulp should look like (taken from the article)

Grunt

You will need the grunt-php plugin

grunt.loadNpmTasks('grunt-browser-sync');
grunt.loadNpmTasks('grunt-php');
grunt.loadNpmTasks('grunt-contrib-watch');

grunt.initConfig({
    watch: {
        php: {
            files: ['app/**/*.php']
        }
    },
    browserSync: {
        dev: {
            bsFiles: {
                src: 'app/**/*.php'
            },
            options: {
                proxy: '127.0.0.1:8010', //our PHP server
                port: 8080, // our new port
                open: true,
                watchTask: true
            }
        }
    },
    php: {
        dev: {
            options: {
                port: 8010,
                base: 'path/to/root/folder'
            }
        }
    }
});

grunt.registerTask('default', ['php', 'browserSync', 'watch']);

Gulp

You will need the gulp-connect-php plugin

// Gulp 3.8 code... differs in 4.0
var gulp = require('gulp'),
    php = require('gulp-connect-php'),
    browserSync = require('browser-sync');

var reload  = browserSync.reload;

gulp.task('php', function() {
    php.server({ base: 'path/to/root/folder', port: 8010, keepalive: true});
});
gulp.task('browser-sync',['php'], function() {
    browserSync({
        proxy: '127.0.0.1:8010',
        port: 8080,
        open: true,
        notify: false
    });
});
gulp.task('default', ['browser-sync'], function () {
    gulp.watch(['build/*.php'], [reload]);
});

Cannot GET/ · Issue #699 · BrowserSync/browser-sync · GitHub, Cannot GET/ #699. Closed. dagolinuxoid opened this issue on Jun 30, 2015 · 7 comments. Closed  BrowserSync / browser-sync. Watch 271 Star 11k Fork 702 Code. Issues 450. Cannot GET /mvyc/add-members.php. browser-sync cannot be used as a php server.

Review Documentation: By default, the index file of the project, for example, can be index.html, but if it has a different name you must specify it with the following flag indicated in the documentation:

--index :Specify which file should be used as the index page

In my case:

browser-sync start --index"datalayer.html"  --server --files "./*.*"

I hope I have helped you, see you.

Browsersync options, Register callbacks via a regular option - this can be used to get access the Browsersync instance in situations where you cannot provide a callback via the  I can't figure out why I am not getting BrowserSync to run. Sass seems to work no problem for me on version 4 of Gulp, but I cannot get BrowserSync to run with Gulp Version 4. I'm still pretty new at this but I know I had to add a gulp.series to make my sass work so I'm not sure if it's the same deal with Browser Sync. Any help would be

this if or grunt users, I know gulp have different settings, have your local server setup but still not working, comment out or delete this line

//server: 'http://localhost/yoursiterootfolder/'

add this line

proxy: "http://localhost/yoursiterootfolder/"

Change "yoursitefolder with actual folder your root folder not theme, template folder you are working on check out https://browsersync.io/docs/grunt for more details Enjoy

BrowserSync Cannot GET / - node.js - html, BrowserSync Cannot GET / - node.js. I only have installed NodeJS and BrowserSync with this command: npm install -g browser-sync After I use this command  Unable to get watch options to work with command line output #1755 opened Apr 10, 2020 by NealWilxite 2 of 10 Browsersync is showing to be running but doesn't show anything on localhost

Cloud9 with Gulp & Browser-Sync.cannot GET / error? Can't figure , As the title says, I'm getting a cannot GET / error when trying to use my gulp/​browser-sync setup on cloud9. The file works just fine on my local  Register callbacks via a regular option - this can be used to get access the Browsersync instance in situations where you cannot provide a callback via the normal API (for example, in a Gruntfile) Note : Only the ready callback is currently supported here.

BrowserSync Cannot GET /, I only have installed NodeJS and BrowserSync with this command: npm install -g browser-sync. After I use this command to start the server: Get started in 5 minutes. 1. Install Node.js. Browsersync is a module for Node.js, a platform for fast network applications. There are convenient installers for MacOS, Windows and Linux. 2. Install Browsersync. The Node.js package manager (npm) is used to install Browsersync from a repository. Open a terminal window and run the following command:

Как решить проблему с browsersync. Cannot GET /index.html , Нужно указать директорию, в которой будут обрабатываться статические файлы (*.html). Добавляем еще один параметр --serveStatic ".". I'm new to gulp and node.js. Therefore, I'm trying them out by packaging the Pug, sass and browsersync into the gulpfile.js. Pug and scss managed to compiled successfully but when I try to view the

Comments
  • I was having the same issue. Did you ever figure this out? I just resorted to using my Apache server.
  • This worked for me using PHP's built-in server. Don't forget to add the port.
  • It's unclear why you mention PHP or XAMPP and how you could possibly know that this user is using those tool sets. The answer provided by @daGo below explained this issue clearly and concisely. Changing the root html file to index.html worked.
  • The poster was clearly inside a XAMPP directory... see file path in the console.
  • Is there any mention of php in the question?
  • Here is how to watch files other than index.html.
  • I appreciate that CLI commands for the package got simplified: browser-sync to serve and browser-sync -w to serve and watch your project.
  • It triggers "PHP server not started. Retrying...". I am using XAMMP on Mac. Any suggestions? I can access everything fine with traditional way of accessing site through browser.
  • Could you please try to clarify what you are saying? I can't understand a large part of your answer. Thank you!
  • Sorry FAbio if the large part of the answer isn't that clear.
  • If you are a grunt user, you have set up browser sync but still getting Cannot GET/ error, it means browser sync is working fine but can't communicate with your server, so all you have to do is just to change the word "server" to proxy and it will be working fine... hope am clear enough