fix(core): Make the module loading for local dev more generic (#17547)

This commit is contained in:
Guillaume Jacquart
2025-07-23 14:13:50 +02:00
committed by GitHub
parent 7330e2d0af
commit 01b95a9ee5

View File

@@ -58,7 +58,8 @@ export class ModuleRegistry {
modulesDir = path.join(n8nRoot, dir, 'modules');
} catch {
// local dev
modulesDir = path.resolve(__dirname, '../../../../cli/dist/modules');
// n8n binary is inside the bin folder, so we need to go up two levels
modulesDir = path.resolve(process.argv[1], '../../dist/modules');
}
for (const moduleName of modules ?? this.eligibleModules) {