server: fixup node modules search path on HA

This commit is contained in:
Koushik Dutta
2025-01-27 13:03:06 -08:00
parent 02ca8bd765
commit a3caa09df4

View File

@@ -48,7 +48,12 @@ export class NodeForkWorker extends ChildProcessWorker {
this.pluginId
];
const nodePaths: string[] = [path.resolve(__dirname, '..', '..', '..', 'node_modules')];
const nodePaths: string[] = [
// /server/node_modules/@scrypted/server/node_modules
path.resolve(__dirname, '..', '..', '..', 'node_modules'),
// /server/node_modules
path.resolve(process.cwd(), 'node_modules'),
];
if (env?.NODE_PATH)
nodePaths.push(env.NODE_PATH);
if (process.env.NODE_PATH)