Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated when Browsersync: Connected #1688

Closed
2 of 10 tasks
kevinmamaqi opened this issue May 8, 2019 · 15 comments · Fixed by #1698
Closed
2 of 10 tasks

Comments

@kevinmamaqi
Copy link

Issue details

As soon as I connect to the server (localhost:3000) I received the following message:
(node:37943) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated

Steps to reproduce/test case

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.

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

  • Browsersync [ 2.26.5 ]
  • Node [ 12.1.0 ]
  • Npm [ 6.9.0 ]

Affected platforms

  • linux
  • windows
  • OS X
  • freebsd
  • solaris
  • other (please specify which)

Browsersync use-case

  • API
  • Gulp
  • Grunt
  • CLI

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

function browsersync(){
  browserSync.init( {
    proxy: projectURL,
    open: false,
    injectChanges: true,
  } );
};

gulp.task( 'default', gulp.series(styles, php, phpDIST, vendorsJS, customJS, images, browsersync, watchTask));
@suhailkc
Copy link

suhailkc commented May 15, 2019

I have the same problem

@kevinmamaqi
Copy link
Author

Hey @suhailkc I had to downgrade to node 10.15.3 LTS to solve it.

@XhmikosR
Copy link
Contributor

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 :)

@XhmikosR
Copy link
Contributor

@hewentaowx
Copy link

I have the same problem,what is the solution?

@XhmikosR
Copy link
Contributor

You ignore the warning, or wait, or use Node.js < 12.x.

@hewentaowx
Copy link

thanks!

@revelt
Copy link

revelt commented May 26, 2019

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.

Screen Shot 2019-05-26 at 11 08 48

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. 👍

@yahacom
Copy link

yahacom commented Jun 4, 2019

Same warning on browserSync 2.26.5 with node 12.3.1 on windows platform.

@YJPL
Copy link

YJPL commented Jun 6, 2019

Same warning using browserSync 2.26.5 with node 12.4.0 on macOS 10.14.5

shakyShane added a commit that referenced this issue Jun 7, 2019
@suhailkc
Copy link

suhailkc commented Jun 10, 2019

Fixed by updating "browser-sync": "^2.26.7".

@fedulovivan
Copy link

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)

@ermannos
Copy link

I'm working with express v4.17.1 and node 12.13.1 and for me the problem is still present

@Arjunalapsapkota
Copy link

Same is the case for me : express v4.17.1 and node 12.13.1 . What is the solution?

@nanthanwa
Copy link

nanthanwa commented Apr 17, 2020

If you come here from Google, you can fix them by upgrade express to version 4.17.1 then an error has gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.