I’m trying to setup a login system where the user registers and logs in with only username and password.
Here’s the error it throws upon registration:
Exception in delivering result of invoking 'ATCreateUserServer': TypeError: Cannot read property 'setError' of undefined
Here’s the relevant code:
Accounts.js (located in client/account):
AccountsTemplates.configure({
focusFirstInput: true,
showForgotPasswordLink: false,
showLabels: false,
texts: {
title: {
changePwd: "Password Title",
enrollAccount: "Enroll Title",
forgotPwd: "Forgot Pwd Title",
resetPwd: "Reset Pwd Title",
signIn: "Sign In To Writeit",
signUp: "Sign Up Title",
verifyEmail: "Verify Email Title",
}
}
});
AccountsTemplates.removeField('email');
var pwd = AccountsTemplates.removeField('password');
AccountsTemplates.addFields([
{
_id: "username",
type: "text",
displayName: "username",
required: true,
minLength: 5,
},
pwd
]);
Packages:
# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
meteor-base # Packages every Meteor app needs to have
mobile-experience # Packages for a great mobile UX
mongo # The database Meteor supports right now
blaze-html-templates # Compile .html files into Meteor Blaze views
reactive-var # Reactive variable for tracker
jquery # Helpful client-side library
tracker # Meteor's client-side reactive programming library
standard-minifier-css # CSS minifier run for production mode
standard-minifier-js # JS minifier run for production mode
es5-shim # ECMAScript 5 compatibility for older browsers.
ecmascript # Enable ECMAScript2015+ syntax in app code
session
#design
#twbs:bootstrap
fezvrasta:bootstrap-material-design
#debugging
meteortoys:allthings
#accounts
accounts-base
accounts-password
service-configuration
useraccounts:core
useraccounts:bootstrap
#router
kadira:flow-router
kadira:blaze-layout
#validation/schema
aldeed:simple-schema
aldeed:collection2
check
Thanks in advanced for the help!