MongoError: The 'cursor' option is required, except for aggregate with the explain argument
Thanks @Neil Lunn
Update mongoose. Mongoose versions prior to 5.0 are incorrectly matched for MongoDB 3.6. MongoDB 3.6 changed the aggregate API from "cursor optional" to "cursor only", and older mongoose versions break this by trying to invoke a deprecated way to ask for an array in response.