In Meteor, I get this error for every method that I define on the client side:
Error invoking Method 'activeMenu': Method not found [404]
As an example, in my code I defined this method, for example:
/client/js/startup/methods.js
Meteor.methods({ ... activeMenu: function() { if(Session.get('menu')) { $('.menu').removeClass('active'); $('#' + Session.get('menu')).addClass('active'); } }, ... });
and it is called from two places - when the application first receives the visualization, and after the router performs its routing:
client/js/rendered.js
Template.ApplicationLayout.rendered = function() { Meteor.call('activeMenu'); }
/client/js/utils/router.js
Router.onAfterAction(function () { Meteor.call('activeMenu'); });
Each call causes an error. However, the method still works, I get the expected results, so the calls should be successful, but I still get errors. These methods work only on the client side, as they are intended for presentation purposes. I need a program without errors, because I suspect that is why spiderable does not work.
source share