{"action":"opened","issue":{"url":"https://api.github.com/repos/codepunkt/mongoose-patch-history/issues/18","repository_url":"https://api.github.com/repos/codepunkt/mongoose-patch-history","labels_url":"https://api.github.com/repos/codepunkt/mongoose-patch-history/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/codepunkt/mongoose-patch-history/issues/18/comments","events_url":"https://api.github.com/repos/codepunkt/mongoose-patch-history/issues/18/events","html_url":"https://github.com/codepunkt/mongoose-patch-history/issues/18","id":309718416,"number":18,"title":"schema.s.hooks.createWrapperSync is not a function","user":{"login":"AbdelrahmanHafez","id":19984935,"avatar_url":"https://avatars3.githubusercontent.com/u/19984935?v=4","gravatar_id":"","url":"https://api.github.com/users/AbdelrahmanHafez","html_url":"https://github.com/AbdelrahmanHafez","followers_url":"https://api.github.com/users/AbdelrahmanHafez/followers","following_url":"https://api.github.com/users/AbdelrahmanHafez/following{/other_user}","gists_url":"https://api.github.com/users/AbdelrahmanHafez/gists{/gist_id}","starred_url":"https://api.github.com/users/AbdelrahmanHafez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbdelrahmanHafez/subscriptions","organizations_url":"https://api.github.com/users/AbdelrahmanHafez/orgs","repos_url":"https://api.github.com/users/AbdelrahmanHafez/repos","events_url":"https://api.github.com/users/AbdelrahmanHafez/events{/privacy}","received_events_url":"https://api.github.com/users/AbdelrahmanHafez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-29T11:28:09Z","updated_at":"2018-03-29T11:28:09Z","closed_at":null,"author_association":"NONE","body":"So, I had an error first, which was \r\n`Error: First param to `schema.plugin()` must be a function, got \"object\"`\r\n\r\nAdding `.default` like: `const patchHistory = require('mongoose-patch-history').default;` did the trick for me.\r\n\r\nNow, I am getting that error, and I am not sure how to handle it.\r\n\r\n```\r\nTypeError: schema.s.hooks.createWrapperSync is not a function                                                                      \r\n    at applyHooks (E:\\Info\\localhost\\Web Development\\NodeJS\\autotash\\node_modules\\mongoose\\lib\\services\\model\\applyHooks.js:50:5)  \r\n    at Function.compile (E:\\Info\\localhost\\Web Development\\NodeJS\\autotash\\node_modules\\mongoose\\lib\\model.js:3782:3)              \r\n    at Mongoose.model (E:\\Info\\localhost\\Web Development\\NodeJS\\autotash\\node_modules\\mongoose\\lib\\index.js:381:22)                \r\n    at createPatchModel (E:\\Info\\localhost\\Web Development\\NodeJS\\autotash\\node_modules\\mongoose-patch-history\\lib\\index.js:284:27)\r\n    at exports.default (E:\\Info\\localhost\\Web Development\\NodeJS\\autotash\\node_modules\\mongoose-patch-history\\lib\\index.js:73:17)  \r\n    at Schema.plugin (E:\\Info\\localhost\\Web Development\\NodeJS\\autotash\\node_modules\\mongoose\\lib\\schema.js:1129:3)                \r\n    at Object.<anonymous> (E:\\Info\\localhost\\Web Development\\NodeJS\\autotash\\modules\\requests\\requests.model.js:55:15)             \r\n    at Module._compile (module.js:635:30)                                                                                          \r\n    at Object.Module._extensions..js (module.js:646:10)                                                                            \r\n    at Module.load (module.js:554:32)                                                                                              \r\n    at tryModuleLoad (module.js:497:12)                                                                                            \r\n    at Function.Module._load (module.js:489:3)                                                                                     \r\n    at Module.require (module.js:579:17)                                                                                           \r\n    at require (internal/module.js:11:18)                                                                                          \r\n    at Object.<anonymous> (E:\\Info\\localhost\\Web Development\\NodeJS\\autotash\\initilize\\globalFuns.js:25:33)                        \r\n    at Module._compile (module.js:635:30)                                                                                          \r\n    at Object.Module._extensions..js (module.js:646:10)                                                                            \r\n    at Module.load (module.js:554:32)                                                                                              \r\n    at tryModuleLoad (module.js:497:12)                                                                                            \r\n    at Function.Module._load (module.js:489:3)                                                                                     \r\n    at Module.require (module.js:579:17)                                                                                           \r\n    at require (internal/module.js:11:18)                                                                                          \r\n```"}}
{"actor":{"display_login":"AbdelrahmanHafez"}}