-
Notifications
You must be signed in to change notification settings - Fork 16
Bug Report: Cannot set property query of #<IncomingMessage> error when using express-mongo-sanitize #202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have the same problem in my Express JS application with TypeScript. The issue seems to be here: code Library Code: When the express-mongo-sanitize module try to reassign the value on the request, that is based on IncomingMessage class from Node JS. I think the class is immutable and therefore there is this error. There are other issues related to this problems. I think for the moment the compatibility of this module with Express 5 is not a priority: issue I'm following the discussion waiting for advice. |
Same error is also happen with me |
When the solution will come |
It seems like this happens after updating to Express 5. Experiencing the same issue. To be fair, it says that "express-mongo-sanitize" is a "Express 4.x middleware". But it would be nice anyway to get a fix 🙏 |
Yes, I am making LMS backend with payment gateway integration and using
some middleware for security. Actually I am a student and learning backend
with nodejs.
…On Tue, May 13, 2025, 13:35 Christian Schwaderer ***@***.***> wrote:
*christian-schwaderer* left a comment (fiznool/express-mongo-sanitize#202)
<#202 (comment)>
It seems like this happens after updating to Express 5. Experiencing the
same issue. To be fair, it says that "express-mongo-sanitize" is a "Express
*4.x* middleware". But it would be nice anyway to get a fix 🙏
—
Reply to this email directly, view it on GitHub
<#202 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BHPZZT4S5DUGRJV5KHTUXA326GRUXAVCNFSM6AAAAAB4JWK5MWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQNZVGQ2TQNJTGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Uh oh!
There was an error while loading. Please reload this page.
When adding the express-mongo-sanitize middleware to my Express.js application, I encounter the following error:
Cannot set property query of # which has only a getter
This error appears on every screen/request after applying the middleware.
i install the middleware:
npm install express-mongo-sanitize
add it to the express app
The text was updated successfully, but these errors were encountered: