Skip to content
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

count exercise: no parrots collection #33

Open
eugenehiggins opened this issue Mar 16, 2016 · 3 comments
Open

count exercise: no parrots collection #33

eugenehiggins opened this issue Mar 16, 2016 · 3 comments

Comments

@eugenehiggins
Copy link

My code is almost exactly like the solution code, but returns no documents. Going into the mongo console I ran show collections. The only collections were docs, system.indexes, and users, but no parrots. I restarted mongod in one terminal (mongod --port 27017 --dbpath=./data --nojournal), and mongo in the next terminal and parrots did show up.

If anyone else is having this issue you may need to restart the db.

@mientje
Copy link

mientje commented Mar 19, 2016

I'm working on the count exercise. My own soluction I think is correct, I see no errors but it just wont run. I even copied the solution code Evan Lucas provides in my js file and I still can't run it. EMs all over the place and each time I see something about 'db.collection('parrots').remove({}, function(err) {' blablabla. Remove? I did that exercise or am I not getting it? All I know is fcc, I'm very very new at this. I think I have restarted that db several times. (I repeat exercise 2). I always get 'sucessfully installed' and that's it. Maybe it's my pc.

@dospunk
Copy link

dospunk commented May 9, 2017

I'm having this issue with the Find exercise I think. I tried running a find that would get everything, just to test if things were working, but the array printed is blank.

@DreamHazard
Copy link

DreamHazard commented Jan 5, 2018

I was able to fix this issue by deleting the files from the data folder and restarting mongod, then running learnyoumongo verify on my js file.

Not sure what was causing the issue but this resolved it.

Further verification can be gained by running mongo learnyoumongo and then show collections from the mongo prompt.

If you can see the collection via the mongo prompt but not from your js file then there may be something wrong with your code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants