node: April 3, 2024 Security Releases
[feed/packages.git] / lang / node / patches / 003-path.patch
1 --- a/lib/internal/modules/cjs/loader.js
2 +++ b/lib/internal/modules/cjs/loader.js
3 @@ -1529,7 +1529,8 @@ Module._initPaths = function() {
4 path.resolve(process.execPath, '..') :
5 path.resolve(process.execPath, '..', '..');
6
7 - const paths = [path.resolve(prefixDir, 'lib', 'node')];
8 + const paths = [path.resolve(prefixDir, 'lib', 'node'),
9 + path.resolve(prefixDir, 'lib', 'node_modules')];
10
11 if (homeDir) {
12 ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_libraries'));