diff --git a/lib/repl.js b/lib/repl.js index b522d7a2653..9c5feb281d1 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -59,7 +59,7 @@ var context; exports.disableColors = process.env.NODE_DISABLE_COLORS ? true : false; // hack for require.resolve("./relative") to work properly. -module.filename = process.cwd() + '/repl'; +module.filename = path.resolve('repl'); // hack for repl require to work properly with node_modules folders module.paths = require('module')._nodeModulePaths(module.filename);