In chapter 4 of Discover Meteor I’m in the part: lib/collections/posts.js Commit 4-1 and get an error stating “Mongo is Not defined” when I add the posts.js. I’m running it on Win Meteor.
paste the code line so we can see
Check the version of Meteor you’re running; if you’re running an extremely old version you might need to use Meteor.Collection
instead. If that’s the case, run meteor update
asap.
I’m running Win Meteor 1.1.
Show us some sample code; ie. where is the file in terms of client
, server
, lib
? And the contents.
Posts = new Mongo.Collection('posts');
Folder file it is in:
lib/collections/posts.js
And where are you getting the error?
I deleted the Meteor and reinstalled it, still has problem. I get the error in the Prompt, says Unexpected mongo exit code 100. Can’t start Mongo Server… See attached.
When you say you deleted Meteor and reinstalled it, how did you do that?
from the control panel.
Can you make sure that the owner of .meteor/local is yourself (ie. Your user) and not the root / administrator user?
I was getting that error pretty often when working through the tutorial, check this thread on SO.
If deleting mongodb.lock
doesn’t work, you can run meteor reset
to clear your database. If you’ve already added fixtures, you’ll have what you need to complete the tutorial.
How do you determine that?
deleted that mongodb.lock still didn’t do anything.
It looks like “allow” is on all users in the “Security” section of properties. Is that the area?
Did you try running meteor reset?
Yea, made bigger error. Screen turned purple in prompt.
I created another Microscope and started from ground up. Seems like it works now.