We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa23776 commit 878907dCopy full SHA for 878907d
lib/internal/modules/cjs/loader.js
@@ -31,6 +31,7 @@ const {
31
ArrayPrototypePush,
32
ArrayPrototypeSlice,
33
ArrayPrototypeSplice,
34
+ ArrayPrototypeUnshift,
35
Boolean,
36
Error,
37
JSONParse,
@@ -1204,8 +1205,8 @@ Module._initPaths = function() {
1204
1205
let paths = [path.resolve(prefixDir, 'lib', 'node')];
1206
1207
if (homeDir) {
- paths.unshift(path.resolve(homeDir, '.node_libraries'));
1208
- paths.unshift(path.resolve(homeDir, '.node_modules'));
+ ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_libraries'));
1209
+ ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_modules'));
1210
}
1211
1212
if (nodePath) {
0 commit comments