This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Description
I am running into an issue in CRA TS which seems to be caused by an outdated webpack-dev-server dependency. The issue is nodejs/node#21665 and it used to occur in CRA too as it was also using an outdated version of the dependency and has since updated it. CRA TS is still using an affected version and the issue reproduces for me in CRA TS:
create-react-app repro --scripts-version=react-scripts-ts
cd repro
- Create a
.env file and place HTTPS=true in it
npm start
- Bypass the security warning in Chrome
- Keep refreshing until the issue occurs (~3 times)
internal/stream_base_commons.js:62
var err = req.handle.writev(req, chunks, allBuffers);
^
TypeError: req.handle.writev is not a function
at writevGeneric (internal/stream_base_commons.js:62:24)
at Socket._writeGeneric (net.js:711:5)
at Socket._writev (net.js:720:8)
at doWrite (_stream_writable.js:408:12)
at clearBuffer (_stream_writable.js:517:5)
at Socket.Writable.uncork (_stream_writable.js:314:7)
at connectionCorkNT (_http_outgoing.js:641:8)
at process._tickCallback (internal/process/next_tick.js:63:19)
I believe the fix would be to update webpack-dev-server the same way. For me this happens on Windows but it should happen under the same conditions described in the linked issue for anyone.