Skip to content
Permalink
Browse files
module: refactor to use more primordials
PR-URL: #36348
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
aduh95 authored and targos committed Jun 11, 2021
1 parent 0f6c3f7 commit 1aae57222067d9f32c21f312c2a96c3a8d6f1bc8
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/internal/modules/cjs/loader.js
@@ -31,6 +31,7 @@ const {
ArrayPrototypePush,
ArrayPrototypeSlice,
ArrayPrototypeSplice,
ArrayPrototypeUnshift,
Boolean,
Error,
JSONParse,
@@ -1204,8 +1205,8 @@ Module._initPaths = function() {
let paths = [path.resolve(prefixDir, 'lib', 'node')];

if (homeDir) {
paths.unshift(path.resolve(homeDir, '.node_libraries'));
paths.unshift(path.resolve(homeDir, '.node_modules'));
ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_libraries'));
ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_modules'));
}

if (nodePath) {

0 comments on commit 1aae572

Please sign in to comment.