お伝えしたいこと
sequelize 2.1.0以降からsuccess関連が使えなくなっているので注意。大人しくthenにしましょう。
Backwards compatibility changes
Events support have been removed so using .on('success') or .success() is no longer supported. Try using .then() instead.
Trying to apply a scope that does not exist will always throw an error
こういうパターンで死にます。
User.findOne.success(function(user){
if (user) {
// なんらかの処理
} else {
// なんらかの処理
});
↓こうしましょう
User.findOne.then(function(user){
if (user) {
// なんらかの処理
} else {
// なんらかの処理
});