-
Notifications
You must be signed in to change notification settings - Fork 0
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
Seeing "JSONCollections is not defined" #1
Comments
Hi, are you getting this error on the client or the server? At what point do you see it? I think the problem may be with Meteor's load order rules (everything in the 'lib' directory will be loaded before other code). Try putting your code in a
|
I was referencing it in a file in my /lib folder. I'll try wrapping it in a startup method as you suggested. |
Hi Ken, the file has to be named like this, otherwise it won’t be recognised and JSONCollections won’t exist: something.collection_name.collection.json On Mon, May 11, 2015 at 5:12 PM, Ken Wallace notifications@github.com
|
That was it. Thanks! |
My pleasure, glad you got it working! |
I added the package to my meteor install, created a file in my /server dir with the name "mmj.mmjParticipants.collection.json"
When I try to read from the collection, I see:
(from a file I have called /lib/collections.js)
Participants = JSONCollections.mmjParticipants;
if (Participants.find().count() === 0) {
console.log("No participants.");
};
I'm getting "JSONCollections is not defined"
Any ideas what I may have done to get this?
The text was updated successfully, but these errors were encountered: