-
-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roles.createRole is not a function #403
Comments
Thank you for submitting this issue! We, the Members of Meteor Community Packages take every issue seriously. However, we contribute to these packages mostly in our free time. If you think this issue is trivial to solve, don't hesitate to submit Please also consider sponsoring the maintainers of the package. |
Same problem for me. I'm trying to solve this last problem before migrating to Meteor v3. |
@demangejeremy The fix is actually quite easy with |
Thanks a lot @zangab, that's what I realized right after I sent my message. Indeed, it's confusing. |
Describe the bug
I am not sure if this is a faulty behavior or intended.
I installed the package along with
accounts-password
and meteorvue
. I followed the docs but as soon as I calledRoles.createRole(...)
the server threw aTypeError
sayingRoles.createRole is not a function
.So I dumped the
Roles
variable and saw that there was only acreateRoleAsync
function present but nocreateRole
. My startup script is async, meaning:The question is now: are the docs wrong? Is this intended?
I saw that in the
common.js
file there is acreateRole
function present.To Reproduce
Install
put this function into the
server/main.js
Expected behavior
Does not throw any error or docs update (place an info somewhere that this can happen).
Screenshots
The text was updated successfully, but these errors were encountered: