pee2pee
pee2pee

Reputation: 3802

Meteor: Uncaught TypeError: Meteor.users is not a function

On a site running Meteor. Through Google chrome console I can run:

Meteor.user()

This returns what's needed for my logged in account.

When I run

Meteor.users()

It returns

VM596:1 Uncaught TypeError: Meteor.users is not a function

Please could someone advise?

Upvotes: 0

Views: 1697

Answers (2)

Shivani
Shivani

Reputation: 43

You have to include the following package in package.js to get Meteor.users to run

[email protected]

Upvotes: 2

khem poudel
khem poudel

Reputation: 587

Meteor.users is a mongo collection containing all user documents. So you cannot do Meteor.users(). Rather you can find documents in there using

Meteor.users.find({}).fetch();

For further information you can see meteor docs

Upvotes: 3

Related Questions