BrowserSync / browser-sync

Keep multiple browsers & devices in sync when building websites. https://browsersync.io
https://discord.gg/2d2xUThp
Apache License 2.0
12.17k stars 754 forks source link

Invalid Browsersync API config kills whole process #655

Open timkendrick opened 9 years ago

timkendrick commented 9 years ago

I've been using Browsersync via the API, and I was struggling for ages to figure out why my app kept crashing on me without any warning shortly after I ran bs.init(). I managed to narrow it down to lib/utils.js#L186, and then realized I had been trying to initialize my browsersync instance with invalid configuration, and browsersync was responding by killing the whole process.

Is the process.exit(1) intentional here? I can understand this makes sense if you're running it directly from the command line, but when you're running it via the API there's already an error callback that is fired when it encounters an error, so surely it should be up to the callback to handle the error gracefully?

shakyShane commented 9 years ago

Yes I agree, this is not expected behaviour and needs resolving.

YuriyHorobey commented 7 years ago

reported more than year ago.. is it resolved? //I'm just looking for dev server for enterprise project and support is very importnat here