Cannot use 'in' operator to search for '_id' in
This error is not specific to Mongoose; it would show if obj
is not an object, but a string for instance:
var obj = 'Account';'id' in obj;// TypeError: Cannot use 'in' operator to search for 'id' in Account
Assuming that it's not a Mongoose issue, you'd be looking somewhere here:
at Object.findOrCreateOneForTwitter (/webroot/api.domain.com/production/models/account.coffee:60:17)
Incidentally, you will get the same error from the dojo parser if you try to load an AMD module and you use require
instead of define
to define the module.