As soon as I connect to the server (localhost:3000) I received the following message:
(node:37943) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
Use node, npm and gulp as indicated below. All the tasks load properly, but when connected with browser-sync at localhost:3000 node sends the DEP0066 message and it stops working.
function browsersync(){
browserSync.init( {
proxy: projectURL,
open: false,
injectChanges: true,
} );
};
gulp.task( 'default', gulp.series(styles, php, phpDIST, vendorsJS, customJS, images, browsersync, watchTask));
I have the same problem
Hey @suhailkc I had to downgrade to node 10.15.3 LTS to solve it.
It's just a warning, so it seems we can ignore it for now. But it'd be nice if this was fixed at some point @shakyShane :)
I'd submit a PR, but I'm not familiar with the codebase.
I have the same problem,what is the solution?
You ignore the warning, or wait, or use Node.js < 12.x.
thanks!
for the record, the DEP0066 message does appear but reloading continues to work, I'm able to use node 12.3.0 to run browser-sync 2.26.5.

Original post implies "it stops working" but I can see things refreshing on my machine! I'm using Gulp and browserSync mostly copy-pasted from official examples, the .pipe(browserSync.stream()); and all.
I'm not denying existence of your issue, I'm saying maybe something is wired up not the right way if refreshing is not happening?
Either way, I hope the API will be updated soon and DEP0066 error will disappear. 👍
Same warning on browserSync 2.26.5 with node 12.3.1 on windows platform.
Same warning using browserSync 2.26.5 with node 12.4.0 on macOS 10.14.5
Fixed by updating "browser-sync": "^2.26.7".
For someone who came here for solution:
Issue may be fixed with upgrading express package to v4.17.1 (we are on node 12.13.0)
I'm working with express v4.17.1 and node 12.13.1 and for me the problem is still present
Same is the case for me : express v4.17.1 and node 12.13.1 . What is the solution?
If you come here from Google, you can fix them by upgrade express to version 4.17.1 then an error has gone.
Most helpful comment
Fixed by updating "browser-sync": "^2.26.7".