Nathan
Nathan

Reputation: 470

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

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

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


Error: TypeError: Cannot call method 'config' of undefined

Upvotes: 6

Views: 2755

Answers (2)

Ross Waguespack
Ross Waguespack

Reputation: 86

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' });

Upvotes: 5

Nathan
Nathan

Reputation: 470

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.

Upvotes: 5

Related Questions