Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is using accounts.ui.config crashing my app?

Tags:

meteor

Code (as suggested in the ui-config documentation ):

Accounts.ui.config({
  passwordSignupFields: 'USERNAME_AND_OPTIONAL_EMAIL'
});


Error: TypeError: Cannot call method 'config' of undefined
like image 723
Nathan Avatar asked Nov 22 '12 11:11

Nathan


2 Answers

I figured out that the file created in your project (yourprojectname.js) is the client script. My problem was that I created a new file called "client.js", although I didn't have to do that. Stupid me!

Hopefully this will be help for to someone else.

like image 99
Nathan Avatar answered Nov 15 '22 17:11

Nathan


If you have a client folder for client files it will work to add it there. I just added it to a config.js file I added in my Client folder and it works fine.

client/config.js

Accounts.ui.config({ passwordSignupFields: 'USERNAME_AND_OPTIONAL_EMAIL' });

like image 40
Ross Waguespack Avatar answered Nov 15 '22 17:11

Ross Waguespack