Discover Meteor Chapter 4 Mongo Not Defined


#1

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.


#2

paste the code line so we can see


#3

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.


#4

I’m running Win Meteor 1.1.


#5

Show us some sample code; ie. where is the file in terms of client, server, lib? And the contents.


#6
Posts = new Mongo.Collection('posts');

Folder file it is in:
lib/collections/posts.js


#8

And where are you getting the error?


#9

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.


#10

When you say you deleted Meteor and reinstalled it, how did you do that?


#11

from the control panel.


#12

Can you make sure that the owner of .meteor/local is yourself (ie. Your user) and not the root / administrator user?


#13

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.


#14

How do you determine that?


#15

deleted that mongodb.lock still didn’t do anything.


#16

It looks like “allow” is on all users in the “Security” section of properties. Is that the area?


#17

Did you try running meteor reset?


#18

Yea, made bigger error. Screen turned purple in prompt.

I created another Microscope and started from ground up. Seems like it works now.