Meteor-Community-Packages / meteor-roles

Authorization package for Meteor, compatible with built-in accounts packages
http://meteor-community-packages.github.io/meteor-roles/
MIT License
920 stars 164 forks source link

TypeError: Cannot set property 'isCalledFromAsync' of undefined ... #370

Closed PatrickKaim closed 11 months ago

PatrickKaim commented 11 months ago

Error occurs when starting to run the app.

How to recreate the issue:

% meteor create rolesTest --vue
% cd rolesTest
% meteor

Runs fine. Now let's add some packages:

% meteor add accounts-password
% meteor add accounts-passwordless
% meteor add planning:roles
% meteor

Error occurs.

See full error output here: Error-alanning-roles.txt

Creating a project with v3.4.0 has no issues just newly released v3.5.0

github-actions[bot] commented 11 months ago

Thank you for submitting this issue!

We, the Members of Meteor Community Packages take every issue seriously. Our goal is to provide long-term lifecycles for packages and keep up with the newest changes in Meteor and the overall NodeJs/JavaScript ecosystem.

However, we contribute to these packages mostly in our free time. Therefore, we can't guarantee your issues to be solved within certain time.

If you think this issue is trivial to solve, don't hesitate to submit a pull request, too! We will accompany you in the process with reviews and hints on how to get development set up.

Please also consider sponsoring the maintainers of the package. If you don't know who is currently maintaining this package, just leave a comment and we'll let you know

PatrickKaim commented 11 months ago

ps. trying to add the previous version doesn't work (or I am doing it wrong).

% meteor add alanning:roles@3.4.0

Changes to your project's package version selections:

alanning:roles  added, version 3.5.0          
zodern:types    added, version 1.0.9

alanning:roles: Authorization package for Meteor

Just tells me v3.5.0 is added

rioadrian commented 11 months ago

Hi, I'm get the same error please update any information about this bugfix status. Thanks in advance

copleykj commented 11 months ago

Looks like the when index creation functions are assigned to variables they lose their context. I've created a pull request to bind the functions to their respective objects before assignment to new variables.