1
1
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:
कारतोफ्फेलस्क्रिप्ट™ 2023-07-31 17:55:16 +02:00 committed by GitHub
parent b7ca27afcf
commit 53e58b408a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {