compile order of node.js modules

The problem is that I have a number of separate modules which I export using module.exports and are inter dependent. Say-

 mongohelper
 transaction
 server
 conhandlr
 appmin

Now, the server module contains a common object that is required by the other four modules. However, when compiling the node app, some of these modules are compiled before the server module for example by using console output I found that the order was -

 Compile order-
 mongohelper
 transaction
 server (..the upper modules have undefined common object now)    
 conhandlr 
 appmin 

So, is there a way by which I can make sure that the server module compiles first so that any dependent modules dont have undefined objects?

Without any actual code, it's hard to understand what you really want to know, but I'll try to give you a basic understanding of how node modules work.

require("module") is a synchronous call. The complete module is evaluated/"compiled" before the parser goes on with the next line of code. This means, that all dependencies are executed in the order they were specified. They are also only executed once per process. That means, that if you're requiring the same module multiple times, it is only executed at the first time and its module.exports is cached.

I suggest reading the docs.