You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: self.build is not a function
at UserSchema.register (/src/node_modules/passport-local-sequelize/lib/passport-local-sequelize.js:182:25)
at /src/server/test/seed-users.js:11:12
The problem is caused by:
UserSchema.register=function(user,password,cb){varself=this,fields={};if(userinstanceofUserSchema.Instance){// Do nothing}elseif(_.isString(user)){// Create an instance of this in case user is passed as usernamefields[options.usernameField]=user;user=self.build(fields);}elseif(_.isObject(user)){// Create an instance if user is passed as fieldsuser=self.build(user);// <===== THIS LINE}
Error:
Stack:
The problem is caused by:
Env:
Babel-config:
with
require('babel/register')({});
Thanks.
The text was updated successfully, but these errors were encountered: