Within Node.js such issue may occur *only* when your dealing with cyclic dependencies. If it's the case just move require's to modules in question to end of the file (after assignment to module.exports), it will fix that.
You say it's Travis error, so maybe it's the case of circular dependencies between packages? See this issue: https://github.com/isaacs/npm/issues/2063 there's also solution for that. If it's none of the above, then either you misinterpreted something, or your modules are not loaded natively by Node but not in a compliant way by some other stuff in the middle, that could be the only explanation. On Thursday, September 6, 2012 1:01:09 PM UTC+2, Andreas Richter wrote: > > One of my modules was using: > > module.exports = { loadModules: loadModules, initModules: initModules, > eventRouteModules: eventRouteModules, notifyDependenciesOfInit: > notifyDependenciesOfInit, > notifyDependenciesOfRoute: notifyDependenciesOfRoute, > registerDependencies: registerDependencies, loadAbout: loadAbout }; > > instead of: > > module.exports.loadModules = loadModules; > module.exports.initModules = initModules; > module.exports.eventRouteModules = eventRouteModules; > module.exports.notifyDependenciesOfInit = notifyDependenciesOfInit; > module.exports.notifyDependenciesOfRoute = notifyDependenciesOfRoute; > module.exports.registerDependencies = registerDependencies; > module.exports.loadAbout = loadAbout; > > Seems harmless and worked pretty much 99% of the time. However when > running mocha on TravisCI it would fail saying it couldn't find loadAbout. > I tried many different things and could not narrow it down to anything > else but this change. The issue occurs both on node 0.6 and 0.8 based > versions. > Locally I tested the same variations on Mac OS and ubuntu and they did not > show the problem. > > Does anyone have any ideas why this would cause problems on some platforms? > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
