aravindnc / mongoose-aggregate-paginate-v2

A cursor based custom aggregate pagination library for Mongoose with customizable labels.
MIT License
131 stars 23 forks source link

cannot set property 'allowdiskuse' of undefined #35

Closed MR-omid closed 2 years ago

MR-omid commented 3 years ago

we set this option to true and give this error: cannot set property 'allowDiskUse' of undefined how can i solve this problem?

aravindnc commented 2 years ago

allowDiskUse is working as expected. Please reopen if issue exists and share more info regarding the issue.

joe-icanio commented 1 year ago
const response = await Model.aggregatePaginate(
          aggregatePipeline,
          {
            page: page,
            limit: count,
            sort: sortObj,
            allowDiskUse: true,
          }
);

TypeError: Cannot set properties of undefined (setting 'allowDiskUse') at Aggregate.allowDiskUse (~/node_modules/mongoose/lib/aggregate.js:804:29)

Encountering the same error

quangkhait98 commented 2 months ago

i have same this issue, the issue have fixed ?