Closed Yangeok closed 5 years ago
@Yangeok You are including the wrong package. It should be, const mongoosePaginate = require('mongoose-aggregate-paginate-v2');
Then you need both package mongoose-paginate-v2 and mongoose-aggregate-paginate-v2. So the npm page is not up to date?
mongoose-aggregate-paginate-v2 is only for aggregate. mongoose-paginate-v2 does not support aggregate.
So you may need both in your project.
I mistook the document. I had to look at usage in mongoose-paginate-v2 and saw usage in mongoose-aggregate-paginate-v2.
Thank you for your help.
@Yangeok Glad to hear that. So I'm closing the issue. Please reopen if needed. Happy Coding!
I followed the tutorial, but it prints a function in the console that does not have an aggregatePaginate () method. What is wrong and what should I do?