Closed astranavt closed 5 years ago
it gives an error: events.js:160 throw er; // Unhandled 'error' event ^
TypeError: fn is not a function at /Users/mk/git/node-express-mongoose-demo/app/models/user.js:78:7 at /Users/mk/git/node-express-mongoose-demo/node_modules/mongoose/lib/model.js:4533:16 at (anonymous function).call.error (/Users/mk/git/node-express-mongoose-demo/node_modules/mongoose/lib/query.js:3800:7) at process.nextTick (/Users/mk/git/node-express-mongoose-demo/node_modules/mongoose/lib/helpers/query/completeMany.js:35:39) at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9)
Sorry for the late response, this should be fixed now. https://github.com/madhums/node-express-mongoose-demo/commit/996565700654522649ff798b7e638655e621efc4#diff-a4b3038d4ee7f4db64a479a6b17460a6
in this place
what is the function of fn ?