diff --git a/lib/module.js b/lib/module.js index ca2c805bb0da16..a068bffa7d9056 100644 --- a/lib/module.js +++ b/lib/module.js @@ -428,14 +428,14 @@ Module.prototype._compile = function(content, filename) { // Native extension for .js Module._extensions['.js'] = function(module, filename) { - var content = internalModuleReadFile(filename); + var content = fs.readFileSync(filename, 'utf8'); module._compile(internalModule.stripBOM(content), filename); }; // Native extension for .json Module._extensions['.json'] = function(module, filename) { - var content = internalModuleReadFile(filename); + var content = fs.readFileSync(filename, 'utf8'); try { module.exports = JSON.parse(internalModule.stripBOM(content)); } catch (err) {