In a node program:
var requirejs = require('requirejs'),
foo = requirejs('foo');
where foo is an AMD module, this will give an undefined value for foo. This is because req.get() defined in build/jslib/node.js does a load() call, but then does not enable the module, so that it finishes execution.
This is a result of the "do not execute define() factory functions until explicitly required" change in 2.0, and it looks like this pathway was just missed in 2.0.
The fix seems to be to call context.enable(moduleMap, relModuleMap) after the req.load() call in req.get().
First reported in this gist: https://gist.github.com/3455313
Fixes #271, restore sync requirejs() at top level in node