Hello,
I am encountering an issue while updating an application from Meteor 2 to Meteor 3. In my application, I use Meteor.userId() within helpers and other functions wrapped with Meteor.bindEnvironment.
Under Meteor 2, everything worked correctly. However, after updating to Meteor 3, I receive the following error when trying to use Meteor.userId() within Meteor.bindEnvironment:
Error: Meteor.userId can only be invoked in method calls or publications.
New Findings
The issue appears in the publish-composite package, where Meteor.bindEnvironment is used in the publication.js file. This usage causes Meteor.userId() to fail.
Hello,
I am encountering an issue while updating an application from Meteor 2 to Meteor 3. In my application, I use
Meteor.userId()within helpers and other functions wrapped withMeteor.bindEnvironment.Under Meteor 2, everything worked correctly. However, after updating to Meteor 3, I receive the following error when trying to use
Meteor.userId()withinMeteor.bindEnvironment:New Findings
The issue appears in the
publish-compositepackage, whereMeteor.bindEnvironmentis used in the publication.js file. This usage causesMeteor.userId()to fail.