Search code examples
httpserver

http-server gives warning message


When I start up http-server as soon as I open the page I get:

node:25611) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
(Use `node --trace-deprecation ...` to show where the warning was created)

Can someone provide specific instructions on:

  1. How to (Use node --trace-deprecation ... to show where the warning was created)
  2. How to fix the problem

Solution

  • There's an open issue on http-server Github for that (#537). In a nutshell, that's not even an issue of the package itself, but of one of its dependencies. And here's the catch:

    This is an issue in union (flatiron/union#64) which we're planning to remove from http-server down the road (#483). I'm not going to close this issue though, to ensure we make sure it goes away after #483 is resolved.

    Now while that was written almost a year ago (Oct 24, 2019), both this issue and aforementioned #483 are still alive and kicking. So unless you really wish to downgrade to Node 10, you'll have to ignore that warning I suppose.