Skip to content

Instantly share code, notes, and snippets.

@tomyan
Created March 30, 2010 13:00
Show Gist options
  • Select an option

  • Save tomyan/349076 to your computer and use it in GitHub Desktop.

Select an option

Save tomyan/349076 to your computer and use it in GitHub Desktop.
require.async('./b', function () {});
require.async('./c', function () {});
var sys = require('sys');
var c = require('./c');
sys.debug(sys.inspect(c));
exports.c = 'c';
# You have two modules, one of which synchronously requires the other. You then
# asynchronously load both modules. The result is that the object returned from
# the sync require does not have the data set up by the second module.
# Run the test with:
node a.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment