Browse Source

node: fix path patch

Signed-off-by: Adrian Panella <ianchi74@outlook.com>
lilik-openwrt-22.03
Adrian Panella 7 years ago
parent
commit
2a42edabdb
1 changed files with 7 additions and 6 deletions
  1. +7
    -6
      lang/node/patches/003-path.patch

+ 7
- 6
lang/node/patches/003-path.patch View File

@ -1,12 +1,13 @@
--- a/lib/module.js --- a/lib/module.js
+++ b/lib/module.js +++ b/lib/module.js
@@ -453,7 +453,8 @@ Module._initPaths = function() {
homeDir = process.env.HOME;
@@ -625,7 +625,8 @@
} else {
prefixDir = path.resolve(process.execPath, '..', '..');
} }
- var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')];
+ var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node'),
+ path.resolve(process.execPath, '..', '..', 'lib', 'node_modules')];
- var paths = [path.resolve(prefixDir, 'lib', 'node')];
+ var paths = [path.resolve(prefixDir, 'lib', 'node'),
+ path.resolve(prefixDir, 'lib', 'node_modules')];
if (homeDir) { if (homeDir) {
paths.unshift(path.resolve(homeDir, '.node_libraries')); paths.unshift(path.resolve(homeDir, '.node_libraries'));

Loading…
Cancel
Save