mirror of
https://github.com/n8n-io/n8n.git
synced 2024-09-11 21:17:50 +03: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 New Issue
Block a user