Skip to content

Instantly share code, notes, and snippets.

@astrotars
Created January 16, 2013 16:44
Show Gist options
  • Select an option

  • Save astrotars/4548698 to your computer and use it in GitHub Desktop.

Select an option

Save astrotars/4548698 to your computer and use it in GitHub Desktop.
error
domain.js:66
throw er;
^
TypeError: Object function model(doc, fields, skipId) {
if (!(this instanceof model))
return new model(doc, fields, skipId);
Model.call(this, doc, fields, skipId);
} has no method 'pre'
at Promise.exports.destroy (/Applications/MAMP/htdocs/apps/labs/sweeps-api/routes/clients.js:82:10)
at Promise.addBack (/Applications/MAMP/htdocs/apps/labs/sweeps-api/node_modules/mongoose/lib/promise.js:128:8)
at Promise.EventEmitter.emit (events.js:93:17)
at Promise.emit (/Applications/MAMP/htdocs/apps/labs/sweeps-api/node_modules/mongoose/lib/promise.js:66:38)
at Promise.complete (/Applications/MAMP/htdocs/apps/labs/sweeps-api/node_modules/mongoose/lib/promise.js:77:20)
at Query.findOne (/Applications/MAMP/htdocs/apps/labs/sweeps-api/node_modules/mongoose/lib/query.js:1607:15)
at model.Document.init (/Applications/MAMP/htdocs/apps/labs/sweeps-api/node_modules/mongoose/lib/document.js:229:11)
at model.init (/Applications/MAMP/htdocs/apps/labs/sweeps-api/node_modules/mongoose/lib/model.js:196:36)
at Query.findOne (/Applications/MAMP/htdocs/apps/labs/sweeps-api/node_modules/mongoose/lib/query.js:1605:12)
at exports.tick (/Applications/MAMP/htdocs/apps/labs/sweeps-api/node_modules/mongoose/lib/utils.js:429:16)
16 Jan 09:41:36 - [nodemon] app crashed - waiting for file changes before starting...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment