question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error with reload browser on gulp

See original GitHub issue

Issue details

If any other gulp task was run, and reload browser. All other SAAS task will trigger inject and then browser reaload. And must be only inject.

Steps to reproduce/test case

Run gulp serve, with watch task inside. Change SAAS file. browsersync will inject all needed css Cahnge HTML file, browsersync will run browser reload Change SAAS file. browsersync will run browser reload

Please specify which version of Browsersync, node and npm you’re running

  • Browsersync [ 2.12.7 ]
  • Node [ 4.2.6 ]
  • Npm [ 3.5.2 ]

Affected platforms

  • [*] linux

Browsersync use-case

  • [*] Gulp

for all other use-cases, (gulp, grunt etc), please show us exactly how you’re using Browsersync

Example of tasks

gulp.watch(source.html, ['html:dev', browserSync.reload]);
gulp.watch(source.saas, ['sass:dev']);

//Saas
gulp.task('sass:dev', function () {
    return gulp.src(source.saas)
        .pipe(plumber())
        .pipe(sourcemaps.init())
        .pipe(sass().on('error', sass.logError))
        .pipe(sourcemaps.write())
        .pipe(changed(source.tmp + '/assets/css/'))
        .pipe(gulp.dest(source.tmp + '/assets/css/'))
        .pipe(browserSync.stream());
});

gulp.task('html:dev', function () {
    return gulp.src(source.html)
        .pipe(plumber())
        .pipe(gulp.dest(source.tmp + '/angular'));
});

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
xavianaxwcommented, Aug 22, 2016

@moh117 Thank you Sir. I got it to work on my end too 👯

0reactions
mohdulecommented, Aug 21, 2016

@xavianaxw Yes i changed my gulpfile to look like this I got rid of the mamp-reload function which was basically reloading stuff , i switched to .on(‘Change’) method instead

now everything is working all right for me 😄

you can check my new gulpfile here gulpfile.js

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gulp.js browser-sync not reloading my browser #1489 - GitHub
Gulp browser -sync is not reloading my browser. When I hit save on my project it builds everything fine. My browser blinks and...
Read more >
Browser-sync not reloading in gulp - Stack Overflow
I have no idea what async completion is, because this is my first time receiving this error. [BS] Local URL: http://localhost:3000 [BS] ...
Read more >
gulp-live-reload-bp - npm
This module is for a browser plugin that reload the browser page in real time.. Latest version: 1.0.2, last published: 10 months ago....
Read more >
Gulp 4 - BrowserSync and Auto Reload - YouTube
Your browser can't play this video. Learn more. Switch camera. Share. Include playlist. An error occurred while retrieving sharing ...
Read more >
Gulp from Scratch: Browser-Sync Auto Reload HTTPS
Support Me ::https://www.patreon.com/alecadddhttp://www.alecaddd.com/support-me/https://amzn.to/2Hcp5moCheck out Elementor: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found