I am creating one app and getting the following error:
TypeError: Accounts.createUser is not a function
Here is my Code:
Template.register.events({
'submit form': function(event){
event.preventDefault();
var email = $('[name=email]').val();
var password = $('[name=password]').val();
var fname = $('[name=fname]').val();
var lname = $('[name=lname]').val();
Accounts.createUser({
email: email,
password: password,
profile: {
fname: fname,
lname: lname,
IsActive: 0
}
});
Router.go('home');
}
});
I am using the : accounts-password package
I am also using the MONGO_URL (MONGO_URL=mongodb://localhost:27017/MYDB)
I have tried : meteor reset
also recreated the app by : meteor create myapp
I can login thru the already created user, Previously it was not giving any issues and I created one User, but now it is giving this issue, What should I do?