BrowserSync / gulp-browser-sync

How to use the Browsersync module with gulp.
http://browsersync.io
384 stars 27 forks source link

browserSync issues after a change in css file #64

Closed L2D22 closed 8 years ago

L2D22 commented 8 years ago

Hello there,

browserSync is so awesome, thanks for sharing it! I ran into an issue when I started a new project this week. I used the example gulp file from here https://www.browsersync.io/docs/gulp/

Now whenever I make a change to a css file I get this error. TypeError: args.cb is not a function at Object.init (../node_modules/browser-sync/lib/public/init.js:25:25)

Also, on the js side after reloading once for a change, browserSync ceases to reload again.

Any ideas what might cause that? I tried downgrading browserSync to a previous version and various things without success. Am I missing something basic?

OSX 10.11.2 El Captain gulpfile https://gist.github.com/L2D22/08b89bcf79cdcbebf2ef package.json https://gist.github.com/L2D22/57c2eff0fb14a3e9585a

karneaud commented 8 years ago

How did you overcome this issue?

L2D22 commented 8 years ago

I don't entirely remember, but I mostly ended up using .pipe(browserSync.stream()); instead of browserSync.reload. https://gist.github.com/L2D22/ea2af736e7f70706080f

karneaud commented 8 years ago

@L2D22 I ended up passing a noop function in the init ...

L2D22 commented 8 years ago

Right, one more thing, I believe for the Object.init error I downgraded my browserSync version to "browser-sync": "^2.10.1"