creationix/http-parser-js

Node 13.0.0 legacy http-parser problem?

meesha81 opened this issue · 3 comments

Hi,
since node 13.0.0 is not available http-parser. I think it's propaby because of module http-parser-js is not compatible with Node >= 13.0.0.

assert.js:378
throw err;
^
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
assert.ok(type === HTTPParser.REQUEST || type === HTTPParser.RESPONSE)
at new HTTPParser (/var/www/apk/app/app-core/node/node_modules/http-parser-js/http-parser.js:7:10)
at FreeList.parsersCb [as ctor] (_http_common.js:154:18)
at FreeList.alloc (internal/freelist.js:20:15)
at tickOnSocket (_http_client.js:655:26)
at onSocketNT (_http_client.js:724:5)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}

Yeah, http-parser-js has not yet been updated for Node v13, I did some digging into it over in #65 - probably shouldn't be too hard to get working, but I don't have the time at the moment. Any PRs would be welcome!

Hi, thank you for information. I would like to fix it, but it's not my skill. I am looking forward to the new version of http-parser-js via npm.
Edited: I did not discover the same problem in #65 because of little unclear subject.

Fix published to NPM as v0.5.2, should work fine on v13.0.1, needs --http-parser=legacy on Node v12.x though.