node-restify icon indicating copy to clipboard operation
node-restify copied to clipboard

[DEP0111] deprecation warning from restify's dependency on node 16

Open pcwiek opened this issue 3 years ago • 16 comments

  • [x] Used appropriate template for the issue type
  • [x] Searched both open and closed issues for duplicates of this issue
  • [x] Title adequately and concisely reflects the feature or the bug

Restify Version: 8.5.1 Node.js Version: 16.1.0

Expected behaviour

No node deprecation warnings. This is mostly important in the longer term, because if the subsequent LTS version drops the deprecated functionality, that means that restify will be incompatible with node 18.

Actual behaviour

When starting the server:

(node:1751) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
    at process.binding (node:internal/bootstrap/loaders:133:17)
    at Object.<anonymous> (/dist/node_modules/http-deceiver/lib/deceiver.js:22:24)
    // cut short

Repro case

Installing restify 8.5.1 and spinning up a restify server on node 16 seems to be enough to trigger the warning.

Cause

Dependency chain: restify -> spdy -> http-deceiver

Are you willing and able to fix this?

I don't think I'm able to. The core functionality that accesses process.binding lives in the http-deceiver package, which is part of spdy. Unless the behavior can be changed there, or the whole dependency can be replaced, I'm not sure what else can be done.

pcwiek avatar May 19 '21 08:05 pcwiek

adding link to dependent issue in spdy 380

GaikwadPratik avatar Jul 24 '21 19:07 GaikwadPratik

I have this problem when do ng serve

Your global Angular CLI version (12.2.6) is greater than your local version (10.2.3). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false". 10% building 3/3 modules 0 active(node:19144) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated. (Use node --trace-deprecation ... to show where the warning was created)

Romulo-S avatar Sep 25 '21 14:09 Romulo-S

Any anticipated movement on this? It would be helpful to know if this project is still generally supported.

dibari avatar Nov 08 '21 14:11 dibari

Is this resolved in v9? The 9.x branch has Node.js 16 listed in the tested CI environments.

nikeee avatar Feb 15 '22 13:02 nikeee

my log file has so many line that contant: "Access to process.binding('http_parser') is deprecated." and for a year you have not fixed it!

mcjambi avatar Feb 18 '22 17:02 mcjambi

10% building 3/3 modules 0 active(node:15988) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated. (Use node --trace-deprecation ... to show where the warning was created) anybody solved this?

bunays avatar Apr 02 '22 06:04 bunays

please any fix for this, it keeps showing in my console and i don't like it

NathBabs avatar Apr 07 '22 11:04 NathBabs

is it safe to use or i should just use express because i don`t like warning

Phero49 avatar Apr 17 '22 14:04 Phero49

I don't know why anyone will use this framework in production, this issue has been around for years and nothing has been done about it. Still flustered as to why this company I just joined is using it, when Express is there. @Phero49 I think you should just use Express

NathBabs avatar Apr 17 '22 14:04 NathBabs

I ended up adding --no-deprecation to node and node-based commands to silent the warning:

  • nodemon --no-deprecation ...
  • ts-node --no-deprecation index.ts
  • node --no-deprecation index.js

shairontoledo avatar May 13 '22 20:05 shairontoledo

It seems Restify 8 supports SPDY as well as HTTP2, by setting options.spdy = ...; see https://github.com/restify/node-restify/blob/master/lib/server.js#L152-L154

As SPDY is considered experimental and deprecated, replaced by HTTP2, it would be an easy fix to just remove SPDY support from e.g. 9+.

djui avatar Jun 01 '22 16:06 djui

i have to change to use http2 in NginX, nodejs should not use spdy.

mcjambi avatar Jun 20 '22 12:06 mcjambi

so any plans to just remove spdy support & package?

mainfraame avatar Oct 27 '22 19:10 mainfraame

According to PR #1929, which adds support for Node 18 but doesn't remove spdy, the deprecation warning still exists.

So the good news is that the deprecation does not block upgrading to Node 18 (once a new version of restify is published after the PR is merged). The bad news is that the deprecation warning will still be there.

nexdrew avatar Nov 17 '22 14:11 nexdrew

Restify 10, Node 16, and still the warning...

NormandoHall avatar Dec 23 '22 05:12 NormandoHall

Have you looked into https://www.npmjs.com/package/spdy-fixes which looks like it depends on http-deceiver-fixes.