Open ljack opened 8 years ago
Add "import"-array to application level so that code in server startup section can work. E.g. doesn't compile because of Apimoons is undefined.
import {Users} from "meteor-user-roles"; Meteor.startup(function() { // read environment variables from Meteor.settings if(Meteor.settings && Meteor.settings.env && _.isObject(Meteor.settings.env)) { for(var variableName in Meteor.settings.env) { process.env[variableName] = Meteor.settings.env[variableName]; } } Apimoons.insert( {name:"Apimoon"}); });
so to fix it you need to import the Apimoon
import {Users} from "meteor-user-roles"; import {Apimoons} from "/lib/collections/apimoons.js"; Meteor.startup(function() { // read environment variables from Meteor.settings if(Meteor.settings && Meteor.settings.env && _.isObject(Meteor.settings.env)) { for(var variableName in Meteor.settings.env) { process.env[variableName] = Meteor.settings.env[variableName]; } } Apimoons.insert( {name:"Apimoon"}); });
Also needed to the client startup section. So: client_imports and server_imports
Add "import"-array to application level so that code in server startup section can work. E.g. doesn't compile because of Apimoons is undefined.
so to fix it you need to import the Apimoon