gulp-browser-sync

Gulp browser says Cannot get /

时光怂恿深爱的人放手 提交于 2019-12-25 01:36:12
问题 I am using gulp.The tasks are getting run creating required folders. But I get Cannot GET/ error when run in browser.I have attached the image of my project structure and also the output in Gulp File structure Problem(Cannot get/) My index.html contains the following: <!DOCTYPE html> <html class="no-js" lang="en"> <head> <title>Bootstrap 4 Layout</title> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel=

gulp + browser-sync Cannot GET / error

岁酱吖の 提交于 2019-12-21 04:49:11
问题 I am learning the front-end build system currently gulp, i want to use brower-sync and the problem is it is not throwing an error in the commad line but instead when it brings up the browser it will not display my html file and it will say "Cannot GET /" error in the browser window. This is my gulpfile.js code var gulp = require('gulp'), uglify = require('gulp-uglify'), compass= require('gulp-compass'), plumber = require('gulp-plumber'), autoprefixer = require('gulp-autoprefixer'),

BrowserSync Gulp doesn't open in Chrome

ぐ巨炮叔叔 提交于 2019-12-13 02:46:01
问题 I try to open my website on localhost using BrowserSync and Gulp in Chrome, but it doesn't work. Default, it open in Firefox and everything works well. But, when I change params in gulpfile.js to open website in Chrome - I have this information: [Browsersync] Couldn't open browser (if you are using BrowserSync in a headless environment, you might want to set the open option to false) My config in gulpfile.js: // browser-sync options // see: https://www.browsersync.io/docs/options/ var

Using browsersync with gulp/nodemon

痴心易碎 提交于 2019-12-11 08:02:01
问题 I'm trying to get Browsersync (version 2.12.5) to work with gulp-nodemon/watching files. These are my gulp tasks. I can't seem to get any of my files to update/reload the browser. var $ = require('gulp-load-plugins')(); var browserSync = require('browser-sync'); var gulp = require('gulp'); // load in gulp tasks etc...... gulp.task('server', function() { return $.nodemon({ script: 'server.js' }); }); gulp.task('browser-sync', ['server'], function() { browserSync.init({ proxy: 'http://localhost

Can't use gulp (with gulp-connect-php and gulp-browser-sync) with multiple projects

只愿长相守 提交于 2019-12-10 22:08:44
问题 I've recently started using gulp and have a nice workflow but when I added the gulpfile to a new project, every time I run gulp from the original project directory, it serves the newest project and I have no idea what I've done. This should be the relevant contents of my gulpfile: var gulp = require('gulp'); /* etc. */ gulp.task('default', function(callback) { runSequence(['connect-sync'], callback ) }); gulp.task('connect-sync', function() { connect.server({ base: 'app' /* tried ./app */ },