diff --git a/packages/cli/src/load-nodes-and-credentials.ts b/packages/cli/src/load-nodes-and-credentials.ts index 662558e3d6..4e33d495c8 100644 --- a/packages/cli/src/load-nodes-and-credentials.ts +++ b/packages/cli/src/load-nodes-and-credentials.ts @@ -260,7 +260,7 @@ export class LoadNodesAndCredentials { dir: string, ) { const loader = new constructor(dir, this.excludeNodes, this.includeNodes); - if (loader.packageName in this.loaders) { + if (loader instanceof PackageDirectoryLoader && loader.packageName in this.loaders) { throw new ApplicationError( picocolors.red( `nodes package ${loader.packageName} is already loaded.\n Please delete this second copy at path ${dir}`,