Code (as suggested in the ui-config documentation ):
Accounts.ui.config({
passwordSignupFields: 'USERNAME_AND_OPTIONAL_EMAIL'
});
Error: TypeError: Cannot call method 'config' of undefined
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.
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'
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With