mimani / mongoose-diff-history

Manage Mongo Collection diff History and versions
Apache License 2.0
55 stars 67 forks source link

Could not run on Typescript project. Does not create history object when i create new object, and when i tried to update old document it got stuck. #68

Open abhinavagarwal8 opened 3 years ago

abhinavagarwal8 commented 3 years ago
Screenshot 2021-05-27 at 8 38 47 PM Screenshot 2021-05-27 at 8 39 10 PM Screenshot 2021-05-27 at 8 33 55 PM

have tried both ways :- // import * as diffHistory from "mongoose-diff-history/diffHistory" // var diffHistory = require('mongoose-diff-history/diffHistory')

tried to declare in typing.d.ts also.

issue remain the same.

it always got stuck at this :- Mongoose: user.findOne({ _bsontype: 'ObjectID', id: <Buffer 5f c8 e8 1d 50 b7 91 51 ea 39 8c b8>}, { projection: {} }) Mongoose: user.find({ _id: ObjectId("5fdb10f4bf8780f7ee0a7799") }, { projection: {} })

Note:- I am trying to setup it in my existing project and trying to update my old documents