Closed arkanos closed 2 years ago
Tried to build the project inside a Docker image using Node Alpine image for 16.13.1 just to discard it was an OS issue but error pops up as well.
After several hours of investigation, I have found that this is not caused by the plugin but is something related with NestJS. I'm opening the issue on their repo. Sorry for any inconvenience.
Describe the bug Using NestJS and after adding mongoose-paginate-v2 to the schemas, when using any endpoint that uses pagination, NodeJS throws the following error:
Any other endpoint that makes use of the same model/schema but without pagination, works without any issue.
This is an example of how I define the schemas:
And this is how I use the plugin in the service:
Not sure if this is related with the plugin itself, NodeJS in mac or the combination of NestJS + the plugin. Further investigation is on course.
Even if error is thrown, endpoint returns the data properly structured as defined in plugin options.
To Reproduce Steps to reproduce the behavior:
Expected behavior No error should be thrown.
Desktop (please complete the following information):