meteor 0.9.1 , Mongo is not defined inside my custom Package

谁说我不能喝 提交于 2019-12-20 02:28:29

问题


Getting Exception Mongo is not defined inside my custom Package

CODE

ABC = new Mongo.Collection('ABC');

ERROR

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

回答1:


You need to list all the packages you use in your package.js file:

Package.onUse(function (api) {
  api.use('mongo', ['client', 'server']);
  ...
});



回答2:


Also check that you have space on your HD, That was my problem.



来源:https://stackoverflow.com/questions/25685985/meteor-0-9-1-mongo-is-not-defined-inside-my-custom-package

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!