These are chat archives for Automattic/mongoose

Sep 2016
Marios Antonoudiou
Sep 29 2016 11:55
hi guys, I am trying the following, unfortunately the document does not update. Could you please confirm the syntax is okay?
Customer.findByIdAndUpdate(, request.payload)
    .then((doc) => {
        return Customer.findById(;
    .then((doc) => {
the original document however, is returned
using mongoose 4.6.1
Marios Antonoudiou
Sep 29 2016 12:16
just for the case that someone falls into similar issues, it was request.payload that was not handled correctly
because of issues completely irrelevant with mongoose
Sep 29 2016 14:24
My Heroku deploys are failing because of the following typescript error(s):
node_modules/@types/mongodb/index.d.ts(337,76): error TS2304: Cannot find name 'Promise'.
here is my tsconfig.json:
    "compilerOptions": {
        "target": "es5",
        "module": "commonjs",
        "moduleResolution": "node",
        "sourceMap": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "removeComments": false,
        "noImplicitAny": false
    "exclude": [
Sibelius Seraphini
Sep 29 2016 18:15
can I query a list of ids that return the mongoose objects in the same order that I've passed the ids?
like this: [50a03f350d6cab050caa150c,55c4b71edbab67616b39d8cf,509587010d6cab1a65ba5406, ], so the first item should be 50a03f350d6cab050caa150c and the second one: ,55c4b71edbab67616b39d8cf,