php - Browser-Sync watching files, but stops loading in browser -


i'm building site php, css/scss, , javascript. several weeks now, when start browser-sync, works little while, starts taking long time load, , chrome gives me error message:

this page isn’t working

localhost didn’t send data.

err_empty_response

i use iis 10 host php file , browser-sync's proxy option. @ first, using bs-config.js file , ruby compile sass. problem started shortly after upgraded sass. so, switched using browser-sync gulp see if fixed issue no luck. can see browser-sync still watching files command line, can't see in browser.

here's os i'm using , version #s in case it's relevant.

  • windows 10 home 64-bit
  • browser-sync - 2.18.13
  • node - 6.10.13
  • npm - 5.3.0
  • php - 7.1.8
  • chrome - 60.0.3112.90

here's bs-config file using.

module.exports = { "ui": {     "port": 3001,     "weinre": {         "port": 8080     } }, "files": ["**/*.php", "css/*.css", "**/*.js"], "watchevents": [     "change" ], "watchoptions": {     "ignoreinitial": true }, "server": false, "proxy": "findmercy.dev", "port": 3000, "middleware": false, "servestatic": [], "ghostmode": {     "clicks": true,     "scroll": true,     "location": true,     "forms": {         "submit": true,         "inputs": true,         "toggles": true     } }, "loglevel": "warn", "logprefix": "bs", "logconnections": true, "logfilechanges": true, "logsnippet": true, "rewriterules": [], "open": false, "browser": "default", "cors": false, "xip": false, "reloadonrestart": true, "notify": true, "scrollproportionally": true, "scrollthrottle": 0, "scrollrestoretechnique": "window.name", "scrollelements": [], "scrollelementmapping": [], "reloaddelay": 0, "reloaddebounce": 0, "reloadthrottle": 0, "plugins": [], "injectchanges": true, "startpath": null, "minify": true, "host": null, "localonly": false, "codesync": true, "timestamps": true, "clientevents": [     "scroll",     "scroll:element",     "input:text",     "input:toggles",     "form:submit",     "form:reset",     "click" ], "socket": {     "socketiooptions": {         "log": false     },     "socketioclientconfig": {         "reconnectionattempts": 50     },     "path": "/browser-sync/socket.io",     "clientpath": "/browser-sync",     "namespace": "/browser-sync",     "clients": {         "heartbeattimeout": 5000     } }, "tagnames": {     "less": "link",     "scss": "link",     "css": "link",     "jpg": "img",     "jpeg": "img",     "png": "img",     "svg": "img",     "gif": "img",     "js": "script" } 

};

and gulpfile i'm using (put quench)

var gulp = require('gulp'), plumber = require('gulp-plumber'), rename = require('gulp-rename'); var autoprefixer = require('gulp-autoprefixer'); var imagemin = require('gulp-imagemin'), cache = require('gulp-cache'); var minifycss = require('gulp-minify-css'); var sass = require('gulp-sass'); var browsersync = require('browser-sync');  gulp.task('browser-sync', function () { browsersync.init({     files: ["**/*.php", "css/*.css", "**/*.js"],     proxy: 'findmercy.dev',     open: false     }); });  gulp.task('bs-reload', function () { browsersync.reload(); });  gulp.task('images', function () { gulp.src('images/**/*')     .pipe(cache(imagemin({         optimizationlevel: 3,         progressive: true,         interlaced: true      })))     .pipe(gulp.dest('images/')); });  gulp.task('styles', function () { gulp.src(['css/**/*.scss'])     .pipe(plumber({         errorhandler: function (error) {             console.log(error.message);             this.emit('end');         }     }))     .pipe(sass())     .pipe(autoprefixer('last 2 versions'))     .pipe(gulp.dest('css/'))     .pipe(rename({         suffix: '.min'     }))     .pipe(minifycss())     .pipe(gulp.dest('css/'))     .pipe(browsersync.reload({         stream: true     }))  });   gulp.task('default', ['browser-sync'], function () { gulp.watch("css/**/*.scss", ['styles']); gulp.watch("*.html", ['bs-reload']); }); 


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -