Reputation: 1795
Getting Exception Mongo is not defined inside my custom Package
ABC = new Mongo.Collection('ABC');
W20140905-17:49:06.809(5.5)? (STDERR) /home/sandeep/.meteor/packages/meteor-tool/.1.0.27.18sl1cs++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/dev_bundle/lib/node_modules/fibers/future.js:173
W20140905-17:49:06.809(5.5)? (STDERR) throw(ex);
W20140905-17:49:06.810(5.5)? (STDERR) ^
W20140905-17:49:06.810(5.5)? (STDERR) ReferenceError: Mongo is not defined
Upvotes: 3
Views: 3085
Reputation: 19544
You need to list all the packages you use in your package.js
file:
Package.onUse(function (api) {
api.use('mongo', ['client', 'server']);
...
});
Upvotes: 17