restify / node-restify

The future of Node.js REST development
http://restify.com
MIT License
10.72k stars 982 forks source link

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

Open pcwiek opened 3 years ago

pcwiek commented 3 years ago

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.

GaikwadPratik commented 3 years ago

adding link to dependent issue in spdy 380

Romulo-S commented 3 years ago

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)

dibari commented 3 years ago

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

nikeee commented 2 years ago

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

mcjambi commented 2 years ago

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!

bunays commented 2 years ago

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?

NathBabs commented 2 years ago

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

Phero49 commented 2 years ago

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

NathBabs commented 2 years ago

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

shairontoledo commented 2 years ago

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

djui commented 2 years ago

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

mcjambi commented 2 years ago

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

mainfraame commented 2 years ago

so any plans to just remove spdy support & package?

nexdrew commented 1 year ago

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.

NormandoHall commented 1 year ago

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

jwyglendowski-precisionlender commented 1 year ago

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