We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8dadaa6 commit cc18907Copy full SHA for cc18907
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,
@@ -1227,8 +1228,8 @@ Module._initPaths = function() {
1227
1228
let paths = [path.resolve(prefixDir, 'lib', 'node')];
1229
1230
if (homeDir) {
- paths.unshift(path.resolve(homeDir, '.node_libraries'));
1231
- paths.unshift(path.resolve(homeDir, '.node_modules'));
+ ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_libraries'));
1232
+ ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_modules'));
1233
}
1234
1235
if (nodePath) {
0 commit comments