Angular: req.handle.writev is not a function , error when running Angular old application

Viewed 1142

I am running Angular application which is old:[angular/cli-1.4.5,node:10.13.0 and windows: win32 x64 ]. when I am serving my application , its compiling successfully , but the web serve get crashed and it saying this following error:"

Error:

 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)

Is there any solution to resolve this error.

2 Answers

setting

"@angular-devkit/build-angular": "0.8.9",

seems to help (originally it was 0.6.8 before I've tried updating node to 10 in my project). The webpack-dev-server which actually contains error is a @angular-devkit/build-angular's dependency.

I had the same problem, I've searched on node crash with req.handle.writev

In my case I was using spdy lib for http2 request, just removed the lib and installed node 12.x.x LTS.

Related