2.5.0 breaks koa bodyparser on startup
lucasmarcelli opened this issue · comments
Hello.
The 2.5.0
release breaks the package co-body
which is depended on by koa-bodyparser
. The error is:
TypeError: Cannot read property 'split' of undefined at toIdentifier (/usr/src/app/node_modules/toidentifier/index.js:24:6)
and the stack trace points to raw-body
as the ultimate source. I added a resolution
in package.json
to force raw-body
to 2.4.3
and the issue was resolved.
Hello, and sorry about that! Is there any more information you can provide to help diagnose? A reproducable example, Node.js version, perhaps the stack trace you are referring to that shows where in raw-body
?
Thank you. The unless I am missing something, the stack trace provided above shows the error from the http-errors packages, not raw-body.
Without some way to reproduce the issue, it is difficult to help. You're encouraged to submit a patch to whatever relevant module the issue it at if you debug it, or I am happy to if you have provide steps to reproduce.
Hi @lucasmarcelli I'm happy to take a look, but I created a simple app that uses koa-bodyparser
and didn't have any issues, even though raw-body 2.5.0 was installed. I'm not sure what the issue is, and there just isn't enough information for me to determine that, as I tried to follow the information you provided. Our test suite passes, and even the koa-bodyparser
test suite passes with raw-body
2.5.0 installed. I tried on Node.js 14.19.0 as well since you said you were using Node.js 14.
I'm at a loss for what, exactly, needs to be changed in order to resolve your issue. I wish I did, of course. If you can provide code and step by step instructions on how to reproduce the error, I would be happy to investigate the solution.
I'll let you know if i can get a good example for you. In the meantime keeping raw-body
at 2.4.3
is fine for me.