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.

Support for node native HTTP2 module

See original GitHub issue

Issue details

Please update browser-sync so it no longer seeks for a third-party node module when you set httpModule: 'http2', but instead uses the node native one.

Please specify which version of Browsersync, node and npm you’re running

  • Browsersync [ ^2.23.6 ]
  • Node [ v9.6.1 ]
  • Npm [ 5.6.0 ]

Affected platforms

  • linux
  • windows
  • [ X ] OS X
  • freebsd
  • solaris
  • other (please specify which)

Browsersync use-case

  • API
  • Gulp
  • Grunt
  • [ X ] CLI

If CLI, please paste the entire command below

node ./.tasks/browsersync.js

for all other use-cases, (gulp, grunt etc), please show us exactly how you’re using Browsersync

    httpModule: 'http2',
    https: {
        key: `${ os.homedir() }/.ssh/key.pem`,
        cert: `${ os.homedir() }/.ssh/cert.pem`
    },

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:17 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
aj-devcommented, Oct 25, 2018

@shakyShane any news on Node’s built-in HTTP2 support? The LTS release v10 is out so it’s not in experimental mode anymore.

1reaction
lunelsoncommented, Aug 26, 2021

@jfstephe my solution from back then probably depends on the specific versions of the resolve and http2 packages at the time. NOTE that @dman777 is using require.resolve in his code above; but this will get the native module not the 3rd party one. You need resolve.sync from the resolve package. OTOH @Andrew-Bx 's insight about createSecureServer vs createServer looks like a better fix if it works

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP/2 | Node.js v19.3.0 Documentation
The node:http2 module provides an implementation of the HTTP/2 protocol. ... for Node.js to be built without including support for the node:crypto module....
Read more >
node.js - NodeJS native http2 support - Stack Overflow
--expose-http2 flag enables experimental HTTP2 support. This flag can be used in nightly build (Node v8.4.0) since Aug 5, 2017 (pull request).
Read more >
Native HTTP/2 support in Node frameworks - Hapi, Koa ...
In this post, we will track the native HTTP/2 support status in some of the most popular Node frameworks. We will also provide...
Read more >
Support for module http2? #2761 - expressjs/express - GitHub
Hi, I would like to know if Express 5.0 will have support for http2: https://github.com/molnarg/node-http2 I was reading a bit and I noticed...
Read more >
Getting Started with HTTP/2 in Node.js - Section.io
We will implement a simple Node.js server with HTTP/2 and server push ... This Engineering Education (EngEd) Program is supported by Section ...
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