Hello I have this error. I do not see it in console but in terminal. Exception in callback of async function: ReferenceError: $ is not defined. I am using bootstrap and its built in modal which I have called without error on the client using $(".modal").modal.(‘show’). I then call this simple method to insert collection with does work without error in console but in terminal i get exception. Here is the method.
addThisCampaignName: function(doc){
check(doc,LoyaltyCampaignNames.simpleSchema());
LoyaltyCampaignNames.insert(doc, function(err, docID) {
if(docID){
$('.modal').modal('hide');
toastr.success('Your Campaign Name was added!', 'Success!');
} else {
toastr.warning(err,'Error!');
}
});
}
Even though the toastr does show and the document is inserted i still get error message in terminal. Two errors to be exact.
1). Exception in callback of async function: ReferenceError: toastr is not defined
2). Exception in callback of async function: ReferenceError: $ is not defined
this script is running in the /libs/ folder and the toaster is not a package but the toaster css and javascript was loaded into /client/plugins/ folder. Any idea what am I doing wrong?