fix(Server): don't use
node >= v10.0.0
@@ Coverage Diff @@ ## master #1451 +/- ## ========================================== + Coverage 73.3% 74.02% +0.72% ========================================== Files 10 10 Lines 663 666 +3 ========================================== + Hits 486 493 +7 + Misses 177 173 -4
Unfortunately, just changing the module to http2 won't work because of expressjs/express#3388
Express doesn't seem to actually use node's request/response stuff but uses custom ones which are then
@evilebottnawi this branch itself should reproduce it; the hard part is automated testing.
To reproduce it, just do an h2 connection to webpack-dev-server in
@michael-ciniawsky "fixing" the node bug will just make the spdy module stop crashing but is not the real fix; either fixing the express bug or migrating away from express are.
@michael-ciniawsky I’m not sure if I’m understanding you correctly, but this PR is not blocked on either of these issues. It fixes the first one, and the second one is just something to keep in mind for the future (fully migrating from SPDY to the built-in HTTP/2 module in Node would be dependent on it being solved).
What this PR may be blocked on is this issue, reported by somebody who tried this code out: nodejs/node#21665 (comment)
I don’t know enough about webpack-dev-server to figure out whether that issue is actually related, and if so, in what way. (And as @Kovensky said, automated testing is hard here & I’m not sure how to do it well.)
`spdy` is effectively unmaintained, and as a consequence of an implementation that extensively relies on Node’s non-public APIs, broken on Node 10 and above. In those cases, only https will be used for now. Once express supports Node's built-in HTTP/2 support, migrating over to that should be the best way to go. Fixes: webpack#1449 Fixes: nodejs/node#21665