Questions tagged [gulp-browser-sync]
148 questions
0
votes
2 answers
Identifier 'browserSync' has already been declared
I keep getting an error "Identifier 'browserSync' has already been declared" but i cant see where the problem is.Here is my code
// Watch files
function watchFiles() {
gulp.watch("*.js", gulp.series(scriptsLint, scripts,…

Miami Larry
- 29
- 10
0
votes
1 answer
Browser sync not connecting url links in project using gulp
I have a project which I am making a workflow for, I have my project that uses gulp to watch browser changes and sass changes. The gulp file is:
var gulp = require('gulp');
var sass = require('gulp-sass');
var browserSync =…

Sole
- 3,100
- 14
- 58
- 112
0
votes
1 answer
local web server can't see folder on level up entry point
I have output folder structure as:
assets
- images
views
- index.html
Assets and Views are siblings and entry point of web-server (browser sync) is views folder, so if it's root, it can't see level up folders, how to resolve it? (Config or folder…

Epitaph
- 5
- 6
0
votes
2 answers
Why can't I get BrowserSync to work with Gulp Version 4?
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…
user5405574
0
votes
0 answers
Gulp task not finishing
Being new to gulp. I have the follwing task. I need to spawn a webserver and then another script has to run some stuff against this webserver. I am currently struggling with finishing the script because the browser-sync task does not finish and…

Gerald Bäck
- 445
- 1
- 5
- 7
0
votes
1 answer
Prevent Browsersync from reloading Wordpress wp-admin pages
I'm trying to avoid browsersync from reloading any pages in the backend of wordpress, with URL's that start with 'mydomain.com/wp-admin'. Below is what I've tried, but with no luck. It works perfectly otherwise, but won't prevent reloading pages in…

Cory Dobson
- 63
- 1
- 9
0
votes
2 answers
When accessing WordPress through BrowserSync using the external url, it redirects to localhost
I am working on a WordPress site from my local system and using Gulp with Browsersync to automatically refresh my browser on changes. For this I am using a proxy to my local Apache server.
This works fine from my local machine, but when I try to…

DutchIgor
- 63
- 1
- 6
0
votes
1 answer
gulp-file-include and BrowserSync Doesn't Reflect the Changes to Browser
I am trying to use gulp-file-include for include some common sections like header or footer from /src/includes folder into any .html pages in a project tree along with BrowserSync to refresh changes.
When I use gulp command from command line it's…

fatihturan
- 135
- 5
- 18
0
votes
1 answer
Browsersync without scss?
I'm new to gulp, and I'm trying to set up browsersync without scss. all of the examples i have seen have you set it up for pre-processing sass. How can I set it to watch the plain css? Here's my gulpfile.js:
const gulp = require('gulp'),
browserSync…

Binyamin Green
- 83
- 1
- 2
- 11
0
votes
1 answer
GULP [Browsersync] Couldn't open browser
Problem - When I run gulp, this message appears:
[Browsersync] Couldn't open a browser (if you are using BrowserSync in a headless environment, you might want to set the open option to false)
gulpfile.js code:
gulp.task('serve', function() {
…

Ray Macz
- 85
- 2
- 9
0
votes
0 answers
BrowserSync with Gulp reloading browser before changes are complete
For a while now i have a very strange problem with Gulp and BrowserSync. Everytime i change the css (sometimes even the HTML) i realized that Gulp updates the browser even when i have not saved neither finished the changes resulting in console…

Lowtrux
- 156
- 2
- 12
- 41
0
votes
1 answer
Using browserSync, the websocket connection does not initialize until after files have changed
Essentially the problem is that BrowserSync isn't "syncing" until after I change a file for the first time, thus the first "refresh" doesn't come for free.
Background:
I'm setting up a very simple repository where we have a gulp process that…

Jeremy Iglehart
- 4,281
- 5
- 25
- 38
0
votes
0 answers
gulp.less import not working when change imported less
Web page is updated when I change the file which is imported in main.less, but styles from imported less file don't change in completed main.min.css
--gulpfile.js--
gulp.task('browser-sync', function() {
browsersync({
proxy: "nika.local",
…

arenwork
- 1
0
votes
2 answers
Gulp browser says Cannot get /
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…

Jerico Borja
- 5
- 6
0
votes
2 answers
Gulp workflow for Express with SASS, BrowserSync, Uglify and Nodemon
Problems I'm facing:
The browser doesn't reflect live changes in .scss or .js
I don't understand whether we have to return the stream from the gulp.task() or not, I visited some websites and watched lectures some of which used return and some…

Divyansh Batham
- 31
- 1
- 6