question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DeprecationWarning for OutgoingMessage.prototype._headers

See original GitHub issue

Accessing the HTTP server throws a DeprecationWarning for OutgoingMessage.prototype._headers on Node version 12.3.1.

const puppeteer = require('puppeteer')
const httpServer = require('http-server')
const server = httpServer.createServer({ root: 'dist/html/' })
server.listen(8080)

const browser = await puppeteer.launch({
  headless: true,
  args: ['--no-sandbox', '--disable-setuid-sandbox']
})

const page = await browser.newPage()
await page.goto('http://localhost:8080', { waitUntil: 'networkidle0' })

What did you expect to happen?

No deprecation warning.

What actually happened?

Got the following warning:

(node:59243) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated

If the issue is a feature request, what is the motivation / use case for it?

Tell us about your environment

  • http-server version: 0.11.1
  • Platform: Mac (Node 10.14.5 12.3.1)

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:49
  • Comments:23 (3 by maintainers)

github_iconTop GitHub Comments

25reactions
rsailcommented, Oct 13, 2020

Is there an ETA when this will be resolved?

10reactions
spacecowgoesmoocommented, Apr 29, 2022

Still happening

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix (node:12388) [DEP0066] DeprecationWarning ...
When I started project I got warning from node ([DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated) every time.
Read more >
OutgoingMessage.prototype._headers is deprecated ...
Hi there, thank you guys for making balenaOS! I try to get a simple node.js with the gcloudsdk working but the image can't...
Read more >
OutgoingMessage.prototype._headers is depreciated, in stock ...
Tell us what's happening: I believe I've set up the helmet.js properly with the following code in my server. app.use(helmet()) ...
Read more >
Changelog - hapi.dev
Node V12 deprecation warning [DEP0066] OutgoingMessage.prototype. ... Add default port to host header when no port specified. Fixes #62.
Read more >
how to fix this problem in node js ? (node:41392) | Chegg.com
(node:41392) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated (Use `node ... <div id="header-div"class="container">
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found