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

DeprecationWarning for OutgoingMessage.prototype._headers #537

Open
rgladwell opened this issue Jun 3, 2019 · 34 comments · May be fixed by #909
Open

DeprecationWarning for OutgoingMessage.prototype._headers #537

rgladwell opened this issue Jun 3, 2019 · 34 comments · May be fixed by #909
Labels

Comments

@rgladwell
Copy link

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)
@Xmader
Copy link
Contributor

Xmader commented Jun 5, 2019

flatiron/union#64

@Smilebags
Copy link

The same occurs when using http-server from the command line. I wonder if this could be resolved?

@Lemraj
Copy link

Lemraj commented Oct 21, 2019

I am having the same problem when running http-server (local).

I have a simple angular app:
1 - ng build --prod
2 - go to dist/{name-app}
3 - run http-server

when browsing the url i get the following error:

image

image

@thornjad
Copy link
Member

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.

@gnganapath

This comment has been minimized.

@rsail
Copy link

rsail commented Oct 13, 2020

Is there an ETA when this will be resolved?

@stoufa

This comment has been minimized.

@jmcollin78
Copy link

Always the problem with very latest build (April 2021). An estimated ETA or fix would be greatly appreciated

@Dragonrun1
Copy link

Over 2 years now. How much longer until this is fixed?

@Saqib92
Copy link

Saqib92 commented Jun 30, 2021

I was running another server on same port (using XAMPP server). I stopped XAMPP and restarted my cmd and its working now.

@rich1n
Copy link

rich1n commented Oct 1, 2021

Still the bug alive? or it is solved?

@thornjad
Copy link
Member

thornjad commented Oct 1, 2021

This is an upstream bug in the dependency union, which is more or less unmaintained. #483 seeks to remove it, but it will take some substantial work. For the time being, I'm not aware of plans to imminently remove the _headers property in Node, so we're not at a crisis point yet. I may not have the time to get to #483 for a while, and would welcome any PRs.

@github-actions
Copy link

This issue has been inactive for 180 days

@github-actions github-actions bot added the stale label Mar 30, 2022
@spacecowgoesmoo
Copy link

Still happening

@ssaakkiii
Copy link

Can't believe it's now 2022 and the bug still exists... Orz

@Eli250
Copy link

Eli250 commented May 10, 2022

I have met the same error

@imad-dh

This comment was marked as spam.

@pingan8787

This comment was marked as spam.

@shinelp100

This comment was marked as spam.

@Zwiqler94
Copy link

Any updates on this?

@mirabilos
Copy link

Might be useful to spin a new version of union fixing just this…?

@Jaystar-Bee
Copy link

This issue is still not fixed yet!!

@JobinZe
Copy link

JobinZe commented Dec 2, 2022

Is there any solution for this?

@kburns2kb
Copy link

Howdy, still not fixed

@MarwenLabidi
Copy link

same problem

@omarzougui
Copy link

Same problem on Nx monorepo with node v19.7.0

@jaanus
Copy link

jaanus commented Mar 20, 2023

Another passer-by surprised by this bug. Was looking for a small Node static web server to run a static site so I can Playwright tests against it during development/CI. This project seems to fit the bill, but this warning is unfortunate.

@akadori
Copy link

akadori commented May 25, 2023

same problem.

@work933k
Copy link

Same here

@eldritchT
Copy link

Same with node v18.15.0 :(
Screenshot_9081788a87c

@FunctionPoint
Copy link

FunctionPoint commented Nov 25, 2023

Still present with Node.js v21.2. Please fix..

@vitalets
Copy link

Temporary solution is to suppress Node.js warnings:

NODE_NO_WARNINGS=1 npx http-server .

@muhamedoufi
Copy link

try npm audit fix --force

@elmalving
Copy link

As the status says - the issue is still open ;-;

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