diff --git a/lib/module.js b/lib/module.js index da8a906f951541..54c56501e31a3d 100644 --- a/lib/module.js +++ b/lib/module.js @@ -388,20 +388,10 @@ Module.prototype._compile = function(content, filename) { return Module._resolveFilename(request, self); }; - Object.defineProperty(require, 'paths', { get: function() { - throw new Error('require.paths is removed. Use ' + - 'node_modules folders, or the NODE_PATH ' + - 'environment variable instead.'); - }}); - require.main = process.mainModule; // Enable support to add extra extension types require.extensions = Module._extensions; - require.registerExtension = function() { - throw new Error('require.registerExtension() removed. Use ' + - 'require.extensions instead.'); - }; require.cache = Module._cache; diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js index dfca2e420263b6..d708e7f21cbfaf 100644 --- a/test/sequential/test-module-loading.js +++ b/test/sequential/test-module-loading.js @@ -127,10 +127,6 @@ assert.equal(require('../fixtures/registerExt2').custom, 'passed'); assert.equal(require('../fixtures/foo').foo, 'ok', 'require module with no extension'); -assert.throws(function() { - require.paths; -}, /removed/, 'Accessing require.paths should throw.'); - // Should not attempt to load a directory try { require('../fixtures/empty');