Db not defined in Meteor Mongo Shell

Trying to make a query in Meteor Mongo Shell and I get the following:


ReferenceError: db is not defined
    at [object Object]:1:-61
    at Script.(anonymous function) [as runInThisContext] (vm.js:41:22)
    at /Users/Targeted123/phil_dev/stats_prototyping/.meteor/local/build/programs/server/shell-server.js:366:27
    at /Users/Targeted123/.meteor/packages/meteor-tool/.1.3.2_4.1h63c7r++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/meteor-promise/fiber_pool.js:33:40

Does anyone know why could be happening? All my collections are coming in undefined.

That reference error looks like it’s coming from the meteor shell, not the mongo shell. Did you use

meteor shell

You should have used

meteor mongo
1 Like