Meteor method defined in lib, can't be found under server/lib -


i have method defined in lib/methods.js:

meteor.methods({     gettask: function( extraparam ) {         return {dummy: 'dummy'};     } }); 

but when call server/lib/environment.js:

meteor.call( "gettask", extraparam ); 

i'm getting method not found, under impression lib/ loaded before server/lib,
or should call method in server/main.js ?

with respect issue, load order rules work follows:

  1. paths containing lib gain priority.
  2. paths gain priority based on depth.

combining 2 shows /server/lib/x.js loaded before /lib/x.js. methods shouldn't issue unless method invoked containing file executed.

your options are:

  1. fix load order moving call suggested. main.js loaded last work.
  2. call method within meteor.startup callback.

Comments

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -