meteor 0.9.1 , Mongo is not defined inside my custom Package

前端 未结 2 1082
执念已碎
执念已碎 2021-01-21 05:26

Getting Exception Mongo is not defined inside my custom Package

CODE

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

ERROR

W20         


        
2条回答
  •  星月不相逢
    2021-01-21 06:13

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

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

提交回复
热议问题