diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js index e471cc013a6531..8bb5f9268437fc 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js @@ -776,7 +776,7 @@ Module._initPaths = function() { } if (nodePath) { - paths = nodePath.split(path.delimiter).filter(function(path) { + paths = nodePath.split(path.delimiter).filter(function pathsFilterCB(path) { return !!path; }).concat(paths); }