mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(core): Fix loading of scoped-community packages (#6807)
fix(code): Fix loading of scoped-community packages
This commit is contained in:
parent
b7ca27afcf
commit
53e58b408a
|
@ -133,11 +133,17 @@ export class LoadNodesAndCredentials implements INodesAndCredentials {
|
|||
nodeModulesDir: string,
|
||||
packageName?: string,
|
||||
): Promise<void> {
|
||||
const installedPackagePaths = await glob(packageName ?? ['n8n-nodes-*', '@*/n8n-nodes-*'], {
|
||||
const globOptions = {
|
||||
cwd: nodeModulesDir,
|
||||
onlyDirectories: true,
|
||||
deep: 1,
|
||||
});
|
||||
};
|
||||
const installedPackagePaths = packageName
|
||||
? await glob(packageName, globOptions)
|
||||
: [
|
||||
...(await glob('n8n-nodes-*', globOptions)),
|
||||
...(await glob('@*/n8n-nodes-*', { ...globOptions, deep: 2 })),
|
||||
];
|
||||
|
||||
for (const packagePath of installedPackagePaths) {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue