If you want to set the mem file prefix you can't do this before you require in node.
E.g.
./nodeInitScript.js
./dir_with_mem_file/myapp.js.mem
./dir_with_js_file/myapp.js
In nodeInitScript.js
global.Module = {
'memoryInitializerPrefixURL': './dir_with_mem_file/'
};
require('./dir_with_js_file/myapp.js');
But if you manually remove var Module; from myapp.js then you can.
Perhaps we need an option like -s USE_GLOBAL_MODULE_IN_NODE=1 which then doesn't output var Module;?