I have the following in a module file:
module.exports = {
myfunc: myfunc
};
var myfunc = function(callback){
callback(err,reply);
};
In an other file I got the reference to that module
var mymodule = require('./modules/mymodule');
mymodule.myfunc(function(err, reply){ ... });
When I call the mymodule.myfunc() I get an error saying "property 'myfunc' is not a function". This happens only with exported functions. The same module exports some 'string' fields and these are working just fine.