b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | --- a/lib/internal/modules/cjs/loader.js |
| 2 | +++ b/lib/internal/modules/cjs/loader.js |
| 3 | @@ -1202,7 +1202,8 @@ Module._initPaths = function() { |
| 4 | path.resolve(process.execPath, '..') : |
| 5 | path.resolve(process.execPath, '..', '..'); |
| 6 | |
| 7 | - let paths = [path.resolve(prefixDir, 'lib', 'node')]; |
| 8 | + let 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')); |