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

ExperimentalWarning: The http2 module is an experimental API. #235

Closed
IceCreamYou opened this issue Oct 26, 2017 · 6 comments
Closed

ExperimentalWarning: The http2 module is an experimental API. #235

IceCreamYou opened this issue Oct 26, 2017 · 6 comments

Comments

@IceCreamYou
Copy link

I am using grunt-contrib-connect@1.0.2. With Node.js v6.11.3, 8.5.0, and 8.6.0, I did not get any warnings when running any Grunt tasks. After upgrading to 8.8.0 and now 8.8.1 (I skipped 8.7.0) I am getting warnings that look like this whenever I run a Grunt task:

(node:19412) ExperimentalWarning: The http2 module is an experimental API.

I assume 19412 is the process ID.

This warning goes away after uninstalling grunt-contrib-connect. It happens regardless of whether I configure a target to use the http2 protocol or not.

It looks like this is because of this change in node v8.8.0: nodejs/node#15685

Essentially it enables the Node.js core http2 module which now overrides the userland package. Importing the userland package now requires setting the environment variable NODE_NO_HTTP2=1.

It seems like a viable solution here would be to check whether the user is running Node 8.8.0+ and use the native http2 module if so.

@toptalo
Copy link

toptalo commented Nov 1, 2017

Get same warning on v8.9.0 (current LTS)

@cssagogo
Copy link

cssagogo commented Nov 3, 2017

Get same warning on Node v9.0.0 and NPM v5.5.1

@Doacola
Copy link

Doacola commented Nov 8, 2017

With NODE_NO_HTTP2=1 in environment variables I tested with latest LTS v8.9.1 the warning is no longer visible but seems like it was not added or just doesn't work in v9.0.0 or v9.1.0 (Both of them were tested).

So if that warning causes that much trouble just up-/downgrade to v8.9.1LTS and that environment variable will remove the message.

So this issue is not directly caused by grunt but instead it's based on latest updates from Node and their decision to add http2 to be exposed by default.
https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V8.md#2017-10-24-version-880-current-mylesborins

@IceCreamYou
Copy link
Author

The OP notes the env variable workaround, but that's not a viable solution for code that needs to be distributed to others. We can't ask every user of the code to add this variable.

More importantly, setting the env variable causes grunt-contrib-connect to use the userland package which is now deprecated. It'd be nice to move onto code that will be maintained.

@knoxcard
Copy link

knoxcard commented Nov 23, 2017

Does not work on v9.2.0 either, when will this be corrected? http2 is commonplace.
It prevents my entire web platform from loading, instead a 502 Bad Gateway is returned from my frontend proxy server NGINX.

Reverting back to v8.7.0.

Any version above node v8.7.0 does NOT work for me.

@XhmikosR
Copy link
Member

XhmikosR commented Sep 6, 2018

This is gone with the latest master changes, will be in v2.0.0 when it's out.

@XhmikosR XhmikosR closed this as completed Sep 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants
@IceCreamYou @XhmikosR @cssagogo @toptalo @knoxcard @Doacola and others