diff --git a/lib/module.js b/lib/module.js index 9d041999da..3d66cb19c0 100644 --- a/lib/module.js +++ b/lib/module.js @@ -400,7 +400,7 @@ Module.prototype._compile = function (content, filename) { sandbox.__filename = filename; sandbox.__dirname = dirname; sandbox.module = self; - sandbox.root = sandbox; + sandbox.root = global; Script.runInNewContext(content, sandbox, filename);